Git Product home page Git Product logo

redux-test's Introduction

redux-test

simulator redux workflow

init workspace

  1. init package.json

    $ npm init

  2. install react

    $ npm install --save react react-dom react-router

  3. install use dependence

    $ $ npm install --save-dev babel-core babel-eslint babel-loader babel-preset-es2015 babel-preset-react eslint eslint-config-airbnb eslint-loader eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react webpack webpack-dev-server html-webpack-plugin

  4. set babel config

    .babelrc

    { "presets": [ "es2015", "react", ], "plugins": [] }

  5. set eslint config // need spend more times to study it, why it always hit error.

.eslintrc

{ "extends": "airbnb", "rules": { "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], }, "env" :{ "browser": true, } }

  1. update webpack.config.js

  2. install react-router and react-router-dom

https://medium.com/@pshrmn/a-simple-react-router-v4-tutorial-7f23ff27adf

router must have one root element.

  <HashRouter>
	      <Switch>
			<Route exact path='/' component={App}></Route>
			<Route path='/home' component={Home}></Route>
		  </Switch>
		</HashRouter>
		

redux-test's People

Contributors

abelyanghw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.