3 ms·
No. This person seems not understand composition. This pattern can be useful but is poorly employed in this example. If you are interested in good practices ple
by tacotacotaco 5y ago
No. This person seems not understand composition. This pattern can be useful but is poorly employed in this example. If you are interested in good practices please read Eric Elliot's Composing Software
https://medium.com/javascript-scene/composing-software-the-book-f31c77fc3ddc https://medium.com/javascript-scene/composing-software-the-b...
- zarathustreal 5y ago100% this person is misusing composition. Especially in the React Component sense. There seems to be some key details of React missing from the original posters' understanding, and I highly recommend anyone reading this to look into functional programming to understand what a React component is and does and how to build higher-level abstractions like the one(s) mentioned by this original poster the correct way. Higher-order functions and a real state management library are the obvious solutions to these problems
- ZephyrBlu 5y agoCan you elaborate on why this is a poor use of composition?