React was open-sourced in 2013. Since then, it has evolved. As you search the web, you’ll stumble across old posts with dated approaches. So, here are eight key decisions your team needs to make when writing React components today.
Before you write your first component, your team needs to agree on a dev environment. Lots of options…
You can ignore types, use prop-types, use Flow, or use TypeScript. Note that prop-types was extracted from to a separate library in React 15.5, so older posts will show imports that don’t work anymore.
The community remains divided on this topic:
I prefer prop-types because I find it provides sufficient type safety in React components with little friction. Using the combination of Babel,
... read the whole story at medium.com.