independent parts of the app - make something the first source of truth, a dictionary for our modular UI - give your component place where they can leave - possibility to test UI separately from the complex behaviour - deeper understanding from the box what state should be handled on the component level and what should go to Flux/Redux
- auto-complete in the IDE - check how component is used in the stories in the storybook - documentation - make the tools generate documentation for you: - “addon-info” in the storybook - react styleguidist - build-in + JSDoc comment blocks
separate project? - publish library as a package in the npm (private or public) - include library in the package.json using GitHub link - make the library sub-module of one of the applications
Enter Higher-Order Components I first learned about this pattern from a gist by Sebastian Markbåge. The gist is a little bit cryptic if you’re not yet fully comfortable with ES6 syntax ”