When I first started writing React, I remember seeing many different approaches to writing components, varying greatly from tutorial to tutorial. Though the framework has matured considerably since then, there doesn’t seem to yet be a firm ‘right’ way of doing things.
Over the past year at MuseFind, our team has written a lot of React components. We’ve gradually refined our approach until we’re happy with it.
This guide represents our suggested best practices. We hope it will be useful, whether you’re a beginner or experienced.
Before we get started, a couple of notes:
... read the whole story at react.statuscode.com.
- We use ES6 and ES7 syntax.
- If you’re not sure of the distinction between presentational and container components, we recommend you