React Wait For Async Function To Finish