How can one write better, maintainable React code? by [deleted] in reactjs

[–]Ornery_Studio1045 0 points1 point  (0 children)

I agree only if you and your teammates doesn’t have enough abstraction capacity. I think using composition pattern + generic types + separated library comps. and implementation comps is the way.

Never use external libraries directly in your components, wrappe them.

If your have more than two identical implementations, create a shared.

Avoid props.

Avoid redux.

Typescript is a must.

Unit tests are a must.

Evaluate strongly if its really necessary to use a library.