Closed erikthedeveloper closed 8 years ago
Proposed refactor for #2
Isolate all of the "brains" into {App,ListView}Container and pass down simple props to the respective "shell" components
Makes use of "Containers" to house the brains and pass down simple props to the "shell" counterparts
See Container Components for an idea of "why" https://medium.com/@learnreact/container-components-c0e67432e005#.yu8f80cg7
This will also come in handy when it comes time to bring in Redux :)
"Containers" are serving to house/abstract state. Not to "eliminate all non stateless function components"
Also
Note: Not yet moved towards binding in the constructor as I'm not 100% sold on sticking with ES6 class syntax yet (http://reactkungfu.com/2015/07/why-and-how-to-bind-methods-in-your-react-component-classes/)
Proposed refactor for #2
Isolate all of the "brains" into {App,ListView}Container and pass down simple props to the respective "shell" components
Makes use of "Containers" to house the brains and pass down simple props to the "shell" counterparts
See Container Components for an idea of "why" https://medium.com/@learnreact/container-components-c0e67432e005#.yu8f80cg7
This will also come in handy when it comes time to bring in Redux :)
"Containers" are serving to house/abstract state. Not to "eliminate all non stateless function components"
Also
Note: Not yet moved towards binding in the constructor as I'm not 100% sold on sticking with ES6 class syntax yet (http://reactkungfu.com/2015/07/why-and-how-to-bind-methods-in-your-react-component-classes/)