DEV Community

Discussion on: The Life-changing (And Time-saving!) Magic Of Feature Focused Code Organization!

Collapse
 
pulljosh profile image
Josh Pullen

This actually feels really similar to the types of design shifts made by React.

First, with JSX, code was split by feature rather than language. (Instead of dividing code into content, styles, and functionality, it's divided by feature -- by component.)

A similar type of shift has been made by the introduction of hooks. Instead of dividing a component's code by lifecycle methods, it is divided by the functionality it supports.

Both changes were controversial at first, but have grown to seem like an obvious best solution over time (more of that yet to come for hooks, I'm sure). Hopefully in the coming years we can learn to better identify and correct backwards (perpendicular?) code separation...