Skip to content

Instantly share code, notes, and snippets.

@yoni333
Forked from AlexRoit/react-redux-install
Created August 19, 2018 13:48
Show Gist options
  • Save yoni333/440b730432ea9e92cd077e9c0c19ff78 to your computer and use it in GitHub Desktop.
Save yoni333/440b730432ea9e92cd077e9c0c19ff78 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