The minimal dev environment to enable live-editing Butter React components.
in your component root tree:
npm install butter-component-builder
add this to your
npm startopen http://localhost:3000
WARNING currently you need to manually install
react-transform-hmr to use the
live-reloader… i don't really understand why that is, if you have any idea
please PR !
your component entry point is
you can put a json file in
test/data.json, and your component will be
mounted with the test data as props.
Your changes will appear without reloading the browser like in this video.
This boilerplate project includes React-friendly ESLint configuration.
npm run lint
You may want to change the host in
0.0.0.0 to allow access from same WiFi network. This is not enabled by default because it is reported to cause problems on Windows. This may also be useful if you're using a VM.
This boilerplate is purposefully simple to show the minimal configuration for React Hot Loader. For a real project, you'll want to add a separate config for production with hot reloading disabled and minification enabled. You'll also want to add a router, styles and maybe combine dev server with an existing server. This is out of scope of this boilerplate, but you may want to look into other starter kits.