npx & yarn & npm
npx & yarn & npm
React Redux App
https://github.com/facebook/create-react-app
npx
(npx comes with npm 5.2+ and higher, see instructions for older npm versions)
# npx & react-redux-app
$ npx create-react-app rra
$ cd rra & npm start
# OR
$ cd rra && yarn start
# production
$ npm run build
-
Local: http://localhost:3000/
-
Your Network: http://192.168.1.115:3000/
Yarn
yarn create is available in Yarn 0.25+
# yarn & react-redux-app
$ yarn create react-app rra
$ yarn start
# Starts the development server.
$ yarn build
# Bundles the app into static files for production.
$ yarn test
# Starts the test runner.
$ yarn eject
# Removes this tool and copies build dependencies, configuration files
# and scripts into the app directory. If you do this, you can’t go back!
npm
npm init
is available in npm 6+
# npm & react-redux-app
$ npm init react-app rra
redux
https://redux.js.org/basics/usage-with-react
$ npm -S react-redux
# OR
$ yarn add react-redux
UMD
https://unpkg.com/react-redux@latest/dist/react-redux.min.js
https://unpkg.com/react-redux@7.0.3/dist/react-redux.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
?
factory(exports, require('react'), require('redux'), require('react-dom'))
:
typeof define === 'function' && define.amd
?
define(['exports', 'react', 'redux', 'react-dom'], factory)
:
(
global = global || self,
factory(global.ReactRedux = {}, global.React, global.Redux, global.ReactDOM)
);
}(this, function (exports, React, redux, reactDom) {
'use strict';
///
Object.defineProperty(exports, 'batch', {
enumerable: true,
get: function () {
return reactDom.unstable_batchedUpdates;
}
});
exports.Provider = Provider;
exports.ReactReduxContext = ReactReduxContext;
exports.connect = connect;
exports.connectAdvanced = connectAdvanced;
Object.defineProperty(exports, '__esModule', { value: true });
}));
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10862102.html
未经授权禁止转载,违者必究!