A showcase of the Redux architecture with React Router
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 8 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
中心对齐提示:此存储库已被弃用,不再维护
请查看以下资源:
http://emmenko.github.io/redux-react-router-async-example
这是一个主要展示Redux和React Router基本功能的模板示例,旨在提供这两库的不同使用场景。
查看Babel 6迁移的相关更新。
特性
- 最新的
react、redux、react-router - 开发环境中的
devtools和热模块替换(Hot Module Replacement) react- 高阶组件
- 高阶函数
redux- 初始化状态
- 店铺增强器(如:localStorage持久化)
- 中间件组合
- 简单配置的reducer
- 异步操作
react-router- 嵌套路由
- 登录保护区域
- 将路由保存在状态中以方便时间旅行
i18n支持通过react-intl- 脚本用于提取消息并生成供翻译人员使用的
XLIFF文件
- 脚本用于提取消息并生成供翻译人员使用的
- 分页的GitHub API
- 使用CSSnext打包
- 开发环境中由webpack注入HTML(支持HMR)
- 生产环境下作为单独文件打包
- 开发工具,如
webpack、babel、eslint
开发
$ npm install
$ npm start
国际化支持
网站上的所有消息都使用react-intl@2.0进行了本地化处理和渲染。
还有一个Babel插件,可以将所有默认消息提取到./_translations/lib目录,以便提供给译者。
$ npm run build:i18n
你还可以运行脚本来提取这些翻译内容的关键值对。
$ npm run build:i18n:langs
致谢
- Redux提供了原子化的Flux架构。
- React带来了诸多优点。
- React-Router提供了其他方面的优势。
- React-Transform让开发过程充满乐趣(并提高生产力)。
- Webpack使一切紧密集成。