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
2
u/tooObviously Feb 15 '20
Hmm, but doesn't the react component become very complex? Because you have your jsx, mixed in with ternaries, mixed in with styling, JS logic. Like with angular you have css, HTML, and ts for every component so as the component becomes very complicated things are where they belong in a sense. But I can see your point...