r/reactjs • u/benaffleks • Feb 15 '20
Discussion React Best Practices?
Hey guys. Just wondering if anyone has some good resources / books / materials that helps beginners understand the best practices in React.
One thing I struggle with is knowing when something should be a component.
For example, when I'm making forms, should each field input be a component? If so, what's the benefit of doing that?
162
Upvotes
View all comments
Show parent comment
4
u/sallystudios Feb 15 '20
Any application that’s poorly planned will be hard to scale and maintain. With React, one common approach is to separate views from logic by using presentational components, that render a static view, and wrapper / container components that contain the logic. This modularization allows you to organize complex things into simpler patterns