githubEdit

Quick Start

React Reduxarrow-up-right is the official Reactarrow-up-right binding for Reduxarrow-up-right. It lets your React components read data from a Redux store, and dispatch actions to the store to update data.

Installation

React Redux 7.1 requires React 16.8.3 or later.

To use React Redux with your React app:

npm install react-redux

or

yarn add react-redux

You'll also need to install Reduxarrow-up-right and set up a Redux storearrow-up-right in your app.

Provider

React Redux provides <Provider />, which makes the Redux store available to the rest of your app:

import React from 'react'
import ReactDOM from 'react-dom'

import { Provider } from 'react-redux'
import store from './store'

import App from './App'

const rootElement = document.getElementById('root')
ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  rootElement
)

connect()

React Redux provides a connect function for you to connect your component to the store.

Normally, you’ll call connect in this way:

Help and Discussion

The #redux channelarrow-up-right of the Reactiflux Discord communityarrow-up-right is our official resource for all questions related to learning and using Redux. Reactiflux is a great place to hang out, ask questions, and learn - come join us!

You can also ask questions on Stack Overflowarrow-up-right using the #redux tagarrow-up-right.

Last updated