I learned how to create a React App from bare bones using NPM and Webpack. I also learned how to integrate SASS and bootstrap into the application along with animations. The end product was awesome.
- Props are perfect in scenarios where components itself doesn't need to be aware of changes that it might have.
- States are for when you want components to be aware of changes happening within itself
- Whenever we send in props, we never change those props UNLESS there is a change happening in parent component. BUT a component will never change props on its own
- the way props changes inside a component are via state
- state is declared in the constructor
- Arrow functions keep this within scope of component
- To render current component content to a parent component you may use {this.props.children} in the child component
- Using SASS and mixings will cut down tons of repetition
- Variables defined with 'let' depends on the enclosure that its within 9b. for (var a) will exist in the same context, lifecycle of the app
- Variables defined with 'var' depend on the 'this' that you're within 10a. for(let a) will only exist in the 'for' enclosure
- const does not change but content inside const may change
- React expect only one root element
- A good practice for setting up the application is to write esomorphic code, which means create the minimal code in each file