一个简单而强大的 React 框架, API 少, 无任何模板。
A simple and powerful React framework with minimal API and zero boilerplate. (Inspired by dva and jumpstate)
Painless React and Redux.
We love React and Redux.
A typical React/Redux app looks like the following:
actions/ directory to manually create all action types (or action creators)reducers/ directory and tons of switch clause to capture all action typesasync actionsdispatch method to dispatch all actionshistory to router and/or sync with storehistory or dispatch actions to programmatically changing routesThe problem? Too much boilerplates and a little bit tedious.
In fact, most part of the above steps could be simplified. Like, create actions and reducers in a single method, or dispatch both sync and async actions by simply invoking a function without extra middleware, or define routes without caring about history, etc.
That's exactly what Mirror does, encapsulates the tedious or repetitive work in very few APIs to offer a high level abstraction with efficiency and simplicity, and without breaking the pattern.
Use create-react-app to create an app:
$ npm i -g create-react-app
$ create-react-app my-app
After creating, install Mirror from npm:
$ cd my-app
$ npm i --save mirrorx
$ npm start
index.js…
See Guide.
See API Reference.
See CHANGES.md.
Yes, it does.
Yes, Mirror integrates Redux DevTools by default to make your debugging more easily.
Yes, specify them in mirror.defaults is all you need to do, learn more from the Docs.
Yes of course, take a look at the addEffect option.
react-router v4.