Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/reduxjs/react-redux into …
Browse files Browse the repository at this point in the history
…add-size-limit
  • Loading branch information
aryaemami59 committed Jun 17, 2024
2 parents fbeb82b + e05ed68 commit 9280d73
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/using-react-redux/accessing-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ store interaction is handled. In typical usage, your own components should never
won't ever reference the store directly. React Redux also internally handles the details of how the store and state are
propagated to connected components, so that this works as expected by default.

However, there may be certain use cases where you may need to customize how the store and state are propagated to
However, there may be certain use cases where you may need to customize how the store is passed to
connected components, or access the store directly. Here are some examples of how to do this.

## Understanding Context Usage
Expand All @@ -26,8 +26,7 @@ Internally, React Redux uses [React's "context" feature](https://react.dev/learn
Redux store accessible to deeply nested connected components. As of React Redux version 6, this is normally handled
by a single default context object instance generated by `React.createContext()`, called `ReactReduxContext`.

React Redux's `<Provider>` component uses `<ReactReduxContext.Provider>` to put the Redux store and the current store
state into context, and `connect` uses `useContext(ReactReduxContext)` to read those values and handle updates.
React Redux's `<Provider>` component uses `<ReactReduxContext.Provider>` to put the Redux store and internal subscription wrappers into context. `useSelector`, `useDispatch`, and `connect` call `useContext(ReactReduxContext)` to read those values and handle updates.

## Using the `useStore` Hook

Expand Down

0 comments on commit 9280d73

Please sign in to comment.