Build single-page applications with Create-react-app combined with React-redux and react-router4

Source: Internet
Author: User

1. Create the project:

A. Global installation create-react-app:npm Install CREATE-REACT-APP-G

B. Execute Create-react-app my-projectname Create your own project, and NPM run start will launch the project after completion.

2. Introduction of component library, plug-in configuration, etc.:

A. Implementing the NPM Install Antd-mobile--save installation component library

B. Perform npm install Babel-plugin-import--save installation on-demand add-ons

C. Perform npm run eject pop-up personalization, add the on-demand load plug-in configuration in the Babel configuration item in Package.json:

    

3. Introduction of Redux, React-redux

A. Perform NPM install Redux--save installation redux

B. Perform npm install Redux-thunk installation thunk plug-in to enable Redux to handle asynchronous operations

C. Perform NPM install React-redux--save installation React-redux simplify parameter delivery

D. Performing NPM install babel-plugin-transform-decorators-legacy--save-dev Installing this plugin supports the adorner notation of Connect

 

4. Introduction of React-router4

A. Implementing NPM install React-router-dom--save

   

Build single-page applications with Create-react-app combined with React-redux and react-router4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.