DEV Community

Discussion on: Writing clean, reusable components in React (best practices)

Collapse
 
brense profile image
Rense Bakker

Yes! Great article on writing good reusable low level components. I just want to point out that you may not want to apply these same rules to all components in a project when they are higher in the tree because of excessive prop drilling (passing down props down the entire component tree). In terms of layering I think it should be something like this: app/root -> composable layout -> (... additional app structure, all composable) -> business logic (actions/fetch/side effects) -> reusable leafs.

Collapse
 
codewithshahan profile image
Programming with Shahan

I agree.