usually when I set up Context API I set it up in context.js file, so I did the same for Redux, and whenever I want to re-render a component I connect() it so it subscribed to the state. But my question is, how do I subscribe to the state in the component that created Redux (I think it's called Provider)? I tried using connect but I got an error, does that mean I shouldn't put any logic in the Provider?
connect()
2.1m questions
2.1m answers
60 comments
56.9k users