jslou-react-component-module-16
v0.1.0
Published
A React component module built for a lightning talk at JSLou http://jslou.org/
Downloads
1
Maintainers
Readme
#jslou-react-component-module-16
A React component module built for a lightning talk at JSLou http://jslou.org/
##Tips for preparing a React component for npm:
- Define React as a peer dependency and webpack external.
- If your other dependencies are small, make them development dependencies and include them in your bundle. This makes it easier for someone to include your module.
- Expose your module as a library via webpack - target should be
'umd'
. - You can name your library to make it available as a global via a script include.
- Using the module as a global won't work unless you expose your module via
module.exports
instead of ES6export default
. - Include an example html file in your repo that demos your module and assists with contribution testing.
- Don't use CSS modules; This makes it difficult for other developer to override your module's CSS styles.