Created
August 19, 2018 13:43
-
-
Save yoni333/fd484b9b73a35e108067c8e4e2c9fa96 to your computer and use it in GitHub Desktop.
redux with react installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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