How I can return value from renderRedirect function after Promise.all? This is my dispatch actions:
this.props.getChildrens(),
this.props.getTeachers(),
this.props.getTeachers()
renderRedirect function:
renderRedirect = async () => {
Promise.all([
this.props.getChildrens(),
this.props.getTeachers(),
this.props.getTeachers()
]).then(() => {
return 'test';
});
};
In my compontent I console.log renderRedirect
function and here is output:
console.log(this.renderRedirect())
Promise {<resolved>: undefined}