DEV Community

Split fat component into smaller flexible components in React

Malcolm Kee on February 19, 2018

When writing React component, one of the common thing that happen is that the component that you write has became a big fat chunk, causing it harde...
Collapse
 
arnemahl profile image
Arne Mæhlum

This is spot on. People who just picked up React commonly make components with lots of jsx, like you would if you were writing the entire html for a page in one file. If you don't split that up into logical compokents you are missing half the point of React. (The other half is how React renders after each state change, makikng you write declarative code.)