Skip to content

Instantly share code, notes, and snippets.

@yoni333
Created August 19, 2018 13:43
Show Gist options
  • Save yoni333/fd484b9b73a35e108067c8e4e2c9fa96 to your computer and use it in GitHub Desktop.
Save yoni333/fd484b9b73a35e108067c8e4e2c9fa96 to your computer and use it in GitHub Desktop.
redux with react installation
npm i create-react-app -g // only once to install this app
//on each project
create-react-app app // redux is invalid name
npm i redux --save
npm i react-redux --save
npm i babel-plugin-transform-decorators-legacy --save
npm run eject
//and then search for 'babel-loader'
//in webpack.config.dev && webpack.config.prod
//and add ' plugins: ['transform-decorators-legacy'],'
//inside 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
//remmber 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