differences between state and props in NextJs
differences between state and props in NextJs
Feiliang Zhou

differences between state and props in NextJs

#webdev#CSS#beginners#programming

differences

stateprops
Internal data, owned by componentExternal data, owned by parent component
Component "memory"Similar to function parameters
Can be updated by the component itselfRead-only
Updating state cuases component to re-renderReceiving new props cuases component to re-render. Usually when the parent's state has been updated
Used to make components interactiveUsed by parent to configure child component("settings")