Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
433 views
in Technique[技术] by (71.8m points)

reactjs - How does redux re-render the component that created it (Provider)

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?

question from:https://stackoverflow.com/questions/65914786/how-does-redux-re-render-the-component-that-created-it-provider

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...