Should ReactRedux.Provider be ReactReduxContext.Provider

Hi everyone,

I’m writing in because I’m wondering if there has been an update on the React Redux library that has not made it to the FCC tutorial? I’m currently on the React Redux curriculum, lesson 4, and I’m following along in FCC as well as on a local create react app webpack & babel compiler. I tried to import ReactRedux
import { ReactRedux } from 'react-redux'
to call ReactRedux.Provider, but got an error. Looking through the react redux documentation it seems the proper import is ReactReduxContext:
import { ReactReduxContext } from 'react-redux'
this worked in my local version as well.

As I am still a beginner, I’m writing this message to get people’s thoughts on if ReactRedux is appropriate or if ReactReduxContext is the appropriate version that should be on the tutorial?

No, that import is used very specifically if you need to bypass the normal connect function and access the store directly.

You put a <Provider> component at the top of the tree, then use the connect function (or hooks, but they aren’t covered in the curriculum) to connect components to the store. That doesn’t change, the curriculum is correct.

That ReduxContextConsumer component isn’t something you’re likely to need. The <Provider/> allows you to pass in a custom context, then you can access that in the same way you would access context normally. I’m unsure as to why you would need to do that (possibly there for other libraries building off redux), but the example is just showing how you can access the default context (that React Redux uses to work)