is a minimal React/Redux dev stack, on top of browserify + budo


Quick start | Usage | Production build | Customization | License

Whatchers Stargazers Forks

NPM version Dependency Status

Quick start

Just run

npm install zeroconf-redux
npx zeroconf-redux
# Yay!

Your browser will open and you can start coding your awesome React/Redux web app now!

If it does not exists, a basic index.js file will be created to be used as the entry for your budo dev server.

Read below for more details and instructions about how to create a package and launch your dev server with an npm start.


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

Tip: If it is not a package you want to add to the npm registry, you should add the following attribute to your package.json file.

  "private": true,

Then with npm do

npm install zeroconf-redux --save-dev

The following dependencies will be installed:

On postinstall a .babelrc is created, if it does not exists. It has the following content

{ "presets": [ "env", "es2015", "react" ] }

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…

<!DOCTYPE html>
    <div id="root"></div>
    <script src="bundle.js"></script>

… add an npm script to your package.json, to run budo dev server, something like

    "start": "budo index.js --dir . --serve bundle.js --open -- -t babelify",

Your index.js looks something like

import React from 'react'
import ReactDOM from 'react-dom'

    You can start coding <em>index.js</em> file.

Now, running npm start it will

  1. Build your code using index.js as entry.
  2. Open your index.html in your browser.
  3. Start watching HTML, JS and CSS files, with livereload on changes.

In the examples/counter folder there is a copy of the classic Redux counter example. You can run it with this command

npm explore zeroconf-redux npm run example_counter

Production build

Following instructions from official React documentation, suppose your package main attribute points to your entry file, for instance src/index.js, and your bundle file is dist/NAME.min.js, where NAME is your package name, you could add an npm script like the following

    "browserify": "browserify ${npm_package_main} -t babelify -g [ envify --NODE_ENV production ] -g uglifyify | uglifyjs --compress --mangle > dist/${npm_package_name}.min.js",


Babel preset env

By targeting specific browsers, Babel can do less work so you can ship native ES2015+ 😎!

For example, you may edit your .babelrc to target specific chrome version

  "presets": [
    ["env", { "targets": { "chrome": "60" } }],

For more details see babel-preset-env.

Async Redux

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

This choice is up to you. For example you could prefer redux-saga. 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.



OS icons provided by icons8.