Hey, I try to create an API calls to remote server in Meteor.startup on client and need to wait for response from them.
So I use redux with redux-thunk and every API call return a Promise, don’t understand how to wait for response in sync way. Maybe somone had same problem and know the solution ? Thanks.
Part of code
Meteor.startup(() => { const accessToken = getCookie('access_token'); Store.dispatch(userActions.checkToken(accessToken)) .then(response => {.... ..... ...must wait for all dispatch and after render dom elements });