/react-initbase

React application, supports SSR isomorphic rendering and client-side rendering

Primary LanguageTypeScript

react-initbase

一个 React 应用,支持客户端渲染和服务端渲染

基于 Windows 平台的构建、开发和测试,因此可能在别的平台上还存在一些问题

Windows: 推荐 Windows 10 及以上版本

该项目为笔者学习参考使用

features

  • React

    • SSR
    • CSR
  • React-Router

    • Fractal
    • Centralized
  • Redux

    • Fractal
    • Centralized
  • Webpack

  • Babel

  • Antd

  • Mobx

  • Koa

  • I18n

  • Axios

  • Jest & Testing-Library

  • Puppeteer

  • Eslint

  • Prettier

  • HRM & Hot-Reload

  • DEY-log & Chalk

  • Typescript

  • PostCSS

  • Less

  • Mockjs (默认不启用)

view

home_ps

fetch

git clone https://github.com/ctime-zliang/react-initbase

usage

// 具体以 package.json 中定义的命令为准

// 以服务端渲染方式启动应用或构建生产包文件
npm run ssr:*

// 以客户端渲染方式启动应用或构建生产包文件
npm run client:*

// 执行自动化测试
npm run jest:*