UPDATE 🎉: v2 contains brand new React v16 😎
One only assumption: your current working directory contains
an index.js that is your entry file:
echo "alert('ok')" > index.js is enough to start.
Now you can run
npm install zeroconf-reduxnpx zeroconf-redux
Read below for more details and instructions to improve this quick
process and launch your dev server with a simple
If you have no package.json yet, create one now! For instance with
npm init or even (for the lazy ones like me :^)
npm init -y.
Then with npm do
npm install zeroconf-redux --save-dev
The following dependencies will be installed:
postinstall a .babelrc is created, if it does not exists.
It has the following content
If you want to trigger it manually, you can run
npm explore zeroconf-redux npm run copy_babelrc
Assuming there is an index.html in the same folder as the package.json with a content like the following...
... add an npm script to your package.json, to run budo dev server, something like
"start": "budo index.js --dir . --serve bundle.js --live --open -- -t babelify",
npm start it will
npm explore zeroconf-redux npm run example_counter
Probably you need to call an asynchronous API: the standard way is to use the Redux Thunk middleware, so you need to install
npm install redux-thunk --save
But this choice is up to you, since there are few alternatives this package does not include a middleware to dispatch async actions. See Async Actions chapter on official Redux documentation for details.
You can benefit from awesome hot reloading feature using livereactload.
npm install livereactload@next react-hot-loader@next
Use a .babelrc like the following
You can create it if you launch
rm .babelrcnpm explore zeroconf-redux npm run copy_babelrc_livereactload
When you create your application you need something like
const root = document
Then add the following npm script to your package.json
"start": "NODE_PATH=. budo -d . -s bundle.js -o index.js -- -t babelify -p livereactload",
npm start you can edit your code and it will be injected
in your page without losing the state.
OS icons provided by icons8.