Create React + Redux app structure with build configurations.
Create React + Redux app structure works on macOS, Windows, and Linux.If something doesn’t work, please file an issue.
npm i -g create-react-redux-app-structure
yarn add global create-react-redux-app-structure
create-react-redux-app-structure my-app
cd my-app/
npm run fast-start
http://localhost:8080/ will be opened automatically.
When you are ready to deploy to staging/production please see Build Scripts section.
You will need to have Node >= 6 on your local development machine and Yarn installed.
Install it once globally:
npm i -g create-react-redux-app-structure
yarn add global create-react-redux-app-structure
Patience, please. It takes time, most of it is spent installing npm packages.
To create a new app, run:
create-react-redux-app-structure my-app
cd my-app/
It will create a directory called my-app inside the current folder.
For running builds you need to have config.json in app/ folder.So you can create new one or rename app/config.json.example.
Inside that file:
npm install
or yarn install
You can run npm run fast-start script, it will install all npm packages, run dev build, server and open http://localhost:8080/
Have a look at Build Scripts section
node index.js
or npm run server
Then open http://localhost:8080/ to see test weather app :)
Development - npm run dev
or yarn run dev
Production - npm run prod
or yarn run prod
Staging - npm run staging
or yarn run staging
Unit - npm run test
or yarn run test
Unit with watch - npm run test:watch
or yarn run test:watch
E2E - npm run e2e
or yarn run e2e
Coverage is here - app/tests/tests/coverage/Icon-report/index.html
Let's imagine that for automation tests we need to get access to the Redux store.We can do that by adding to the window
object property with reference to the store. For e.g. in app.jsx
file.Automation tests run only in staging, so for production build we remove them out by Grunt task strip_code
/* staging-code */
window.store = store;
/* end-staging-code */
Kill all node processes:
sudo killall -9 node
taskkill /f /im node.exe
I would love to have your help.
If you have an idea how to improve or found an issue please read the Contributions Guidelines before submitting a PR.Thanks!
MIT © Vasyl Stokolosa
Hello everyone! With the recent release of create-react-app v3 and React hooks, I decided to write a tutorial on how to refactor a class component to a functional hooks component. 大家好! 随着最近发布的create-r
by Arnel Enero 通过Arnel Enero 如何简化React应用程序中的状态-轻松实现Redux (How to simplify state in your React app — Redux with a twist) 良好的旧Redux的新的,更容易的语法和语义 (New, much easier syntax and semantics for good old Redux
by Andrea Bizzotto 通过安德里亚·比佐托(Andrea Bizzotto) 使用Redux在React Navigation App中管理状态 (Managing State in a React Navigation App with Redux) In this tutorial, I will show how to manage navigation and applic
by Panagiotis Vrs 通过Panagiotis Vrs 从AngularJS到React&Redux —如何迁移您的Web应用 (From AngularJS to React & Redux — how to migrate your web app) Some days ago I wanted to start implementing something I had in m
Create React App 不用配置就可以创建 React App。 全局安装: npm install -g create-react-app 创建 App: create-react-app my-appcd my-app/ 启动 npm: npm start 打开 http://localhost:3000/ 查看你的 App。 如果你准备将其部署到生产环境,只需创建一个压缩包,并且运行 npm run build。
Create React Native App The fastest way to create universal React Native apps npx create-react-native-app Once you're up and running with Create React Native App, visit this tutorial for more informat
create-react-app React Project with Node Express Backend Example on using create-react-app with a Node Express Backend Usage Install nodemon globally npm i nodemon -g Install server and client depende
创建响应应用时,图像中出现错误。它一直在正常工作,我所做的就是mkdir和cd到那个dir。 这就是错误的样子... NPX:在36.634s中安装了99必须使用导入来加载ES模块: C:\用户\Neeraj\AppData\漫游\npm-cache_npx\5172\node_modules\create-react-app\node_modules\is-promise\index.js不支持
问题如下: 想要在React 项目执行yarn build 时, 给index.html 增加后缀 没有使用react-eject, 使用的是crao 替代, 但是craco.config.js 配置 HtmlWebpackPlugin不生效。 craco.config.js 配置如下: package.json 部分组件版本如下: 执行yarn build 打包后,配置无效, 请教各位大佬们了
问题内容: 我正在尝试在Google App Engine上部署使用create-react-app创建的应用程序。 我的应用程序在本地(和)都可以正常运行。但是,在Google App Engine上部署的应用程序仅显示index.html,并且不会调用我的react代码。 Chrome开发者控制台显示。 另外,我在console.cloud.google.com上发现,已部署的应用程序不包含构