ZXzxcvcxz·May 28, 2016
>it sometimes seems like a minor change to the UI can require a major change to the source, cascading through multiple components.
>in React I'm finding result in needing to change where state is kept (or what things are state and what things are props), requiring cascading changes to many components.
It sounds like you don't have a good understanding of state vs props. You should use state as little as possible and try to do as much as possible through props, passing them down from the parent components as necessary.
When I create a react app I use the flux architecture, define a state on the top parent component and then add most of the other components as children to this parent component, passing down state as props, and adding listeners to update the components when the state of the parent changes.
As far as moving elements around I
Read the rest
mostly do that through CSS and wasn't aware react had much to do with positioning elements
>taking a UI widget/component that previously was only one one page and realizing it had to be re-used on another(s)
Import it into the component that renders the other page and use different props. If you define a lot of stuff in the state of the component then the component isn't as portable.
>moving a UI widget from one part of the page to another;
This just sounds like CSS and possibly markup to me.
>taking a UI widget that previously just displayed something and realizing it needs to have an 'edit' capability too
Not sure what you mean by this.
Sounds like you could use more practice.
https://github.com/uberVU/react-guide/blob/master/props-vs-s...