I am currently trying to manage data dependencies in a react app. Usually I would just use waitFor, but this doesnt seem to do here, since it won't wait for the async data fetching, just for the sync operations.
Depender:
@bind(Actions.showUserForm)
showUserForm(id) {
const user = UserStore.getState()[id];
this.setState({form: createPrefil(user});
}
The Depender needs somehow to wait for the Dependees async response with the user data. I could just listen to the success action, though this would trigger the Depender everytime a user is fetched from the backend.
Is there an idiomatic solution for those kind of problems?
I am currently trying to manage data dependencies in a react app. Usually I would just use waitFor, but this doesnt seem to do here, since it won't wait for the async data fetching, just for the sync operations.
Depender:
Dependee:
Dependee Source
The Depender needs somehow to wait for the Dependees async response with the user data. I could just listen to the
success
action, though this would trigger the Depender everytime a user is fetched from the backend.Is there an idiomatic solution for those kind of problems?