Skip to content

Instantly share code, notes, and snippets.

@AlexRoit
Created August 19, 2018 13:45
Show Gist options
  • Save AlexRoit/1e0554f0f547840abe7e1db011a323f4 to your computer and use it in GitHub Desktop.
Save AlexRoit/1e0554f0f547840abe7e1db011a323f4 to your computer and use it in GitHub Desktop.
npx create-react-app newapp // only first time to install react
create-react-app newapp // newapp is the name of new folder with json-pack
npm i redux --save // --save means to save in json package
npm i react-redux --save
npm i babel-plugin-transform-decorators-legacy --save
npm run eject
search for 'babel-loader' in webpack.congig.dev && webpack.config.prod
add ' plugins:['transform-decorators-legacy'],' insade options
in react we need to export Provider and connect from 'react-redux'
wrap - with Provider the main App component
and pass store as props
//remember to create store before:)
>Provider store = {store}> <App/> </Provider>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment