Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal
Created December 23, 2017 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amandeepmittal/c5ec0e3d4d99bc2265784909ca2118f8 to your computer and use it in GitHub Desktop.
Save amandeepmittal/c5ec0e3d4d99bc2265784909ca2118f8 to your computer and use it in GitHub Desktop.
Redux in RN
npm i --save redux react-redux redux-thunk redux-promise && npm i --save-dev remote-redux-devtools remotedev-rn-debugger remote-redux-devtools redux-logger
@amandeepmittal
Copy link
Author

amandeepmittal commented Dec 23, 2017

Tooling explained:

  • redux — Redux library.
  • react-redux — Glue for React and Redux.
  • remote-redux-devtool remotedev-rn-debugger remote-redux-devtools
  • redux-thunk — Redux thunk let’s us to return a function inside an action instead returning a object.
  • redux-logger — logs the previous state, action and the next state in the console.
  • redux-promise — Allows us to resolve async actions (promises) with Redux. Example: Fetching data from an API.

Note: logger must be the last middleware in chain, otherwise it will log thunk and promise, not actual actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment