top | item 27031802

(no title)

cmwelsh | 4 years ago

Absolutely. The best thing I did for my React code base was to separate the entire view layer from the logic layer. That literally means I had components called e.g. UserProfileView that were stateless and unit tested, and another set of components called e.g. UserProfile that managed state.

Push all your callbacks into a separate component.

discuss

order

No comments yet.