- similar to normal event handling (responds to target and such, but has other properties)
Refs and the Dom
- They are the mechanism used in React for passing data from parent to child components
- Props can’t be changed from inside the component; they are passed and “owned” by the parent.
- React’s components can have mutable data inside this.state.
- when the state is updated, the component triggers the reactive rendering, and the component itself and its children will be re-rendered. As mentioned, this happens very quickly due to React’s use of a virtual DOM.
Component to action to store
- the store is subscribed to the action
- components subscribed to stores -> re-render
props are immutible -> given the state of the application, what doe the component look like?
?what is the value of the actions step -> ususually just passing through to the store
user inputs triggers the action
- inputs into the system -> actions
- action updates the state
which updates the components
store is more flexibile than backbone collections and models
- based on the change what literal DOM manipulations are needed -> taken care of virtual DOM