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
3.6k views
in Technique[技术] by (71.8m points)

react中监听redux内容中值改变

小白求解,在使用react和redux中遇到一个问题,比如有两个同级组件Top和Bottom,Top可以录入一些搜索,然后点击搜索按钮,录入的数据存入store中,如果这个时候想要Bottom开始根据录入的内容查询应该怎么做,我目前用是在Bottom中用store.subscribe监听的,但是这样的话,如果在Bottom中修改了store也会触发这个监听,大概是下图这样,求各位大佬指点!!! ????

image.png


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

1 Answer

0 votes
by (71.8m points)
等待大神解答

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

...