xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

npx & yarn & npm

npx & yarn & npm

React Redux App

https://reactjs.org/

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

http://localhost:3000/

# production
$ npm run build

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 发布文章使用:只允许注册用户才可以访问!


posted @ 2019-05-14 14:42  xgqfrms  阅读(1119)  评论(5编辑  收藏  举报