Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mirror

> 前端框架
Open source

A simple and powerful React framework with minimal API and zero boilerplate.

1.4K stars0 likes4 views
WebsiteGitHub

About

A simple and powerful React framework with minimal API and zero boilerplate.

Mirror

查看中文

A simple and powerful React framework with minimal API and zero boilerplate. (Inspired by dva and jumpstate)

Painless React and Redux.

Why?

We love React and Redux.

A typical React/Redux app looks like the following:

  • An actions/ directory to manually create all action types (or action creators)
  • A reducers/ directory and tons of switch clause to capture all action types
  • Apply middlewares to handle async actions
  • Explicitly invoke dispatch method to dispatch all actions
  • Manually create history to router and/or sync with store
  • Invoke methods in history or dispatch actions to programmatically changing routes

The 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.

Features

  • Minimal API(only 4 newly introduced)
  • Easy to start
  • Actions done easy, sync or async
  • Support code splitting
  • Full-featured hook mechanism

Getting Started

Creating an App

Use create-react-app to create an app:

bash
$ npm i -g create-react-app
$ create-react-app my-app

After creating, install Mirror from npm:

bash
$ cd my-app
$ npm i --save mirrorx
$ npm start

index.js

…

Demo

Guide

See Guide.

API

See API Reference.

Examples

  • User-Dashboard (An example similar to dva-user-dashboard)
  • Counter
  • Simple-Router
  • Todo

Change log

See CHANGES.md.

FAQ

Does Mirror support TypeScript?

Yes, it does.

Does Mirror support Redux DevTools Extension?

Yes, Mirror integrates Redux DevTools by default to make your debugging more easily.

Can I use extra Redux middlewares?

Yes, specify them in mirror.defaults is all you need to do, learn more from the Docs.

I'm really into Redux-Saga, is there any way to use it in Mirror?

Yes of course, take a look at the addEffect option.

Which version of react-router does Mirror use?

react-router v4.

Issues· 31 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptmirrorreactreact-frameworkreact-router

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架