Answer the question
In order to leave comments, you need to log in
React Redux, how to limit data loading from redux store?
Good afternoon, such a problem. There is a list of projects, we add a list of works to it. At the backend level, I link jobs to the project and successfully load them, but if I open two projects, their jobs are the same. I use the ComponentWillMount method
componentDidMount() {
if (this.props.projectId===this.props.works.projectId) {
this.props.loadWorks(this.props.projectId);
}
Answer the question
In order to leave comments, you need to log in
It's hard to tell from the description, I can only guess.
Your component is mounted once and when you reopen the project, loadWorks is not called to update the work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question