4 ms·
i still wonder where/what the difference between state and props are. Say, I render a collection where user selects one item at a time. where is the state? what
by poseid 12y ago
i still wonder where/what the difference between state and props are. Say, I render a collection where user selects one item at a time. where is the state? what are properties of that collectionview?
- gcanti 12y agoI think there is no "proper" difference. For what I understand it's only a practical way to have a segregated state only the component is interested of. React.js is a valuable precursor but I hope we'll have something different soon.
- andrewflnr 12y agoIf I understand it right, state is supposed to transient, and you generally want to use it as little as possible, as more of an implementation detail than a part of the interface, like props are.