android - React-Native call a function on default animation end? -


in app screen, calling several api's on componentdidmount() shown below

componentdidmount(){       approvername = i18n.t('setapprover',{locale:locale});       asyncstorage.getitem("authkey").then((ak) => {           authkey = ak;           settimeout(() => {currentcontext.props.getleavetypes(ak)}, 10000);           settimeout(() => {currentcontext.props.getcategory(ak)}, 10000);           settimeout(() => {currentcontext.props.getprojects(ak)}, 10000);         }).done();      } 

since api calls occur parallelly animation there delay during screen loading(animation slow), tried calling api after timeout not helping.

please tell me how call below functions

currentcontext.props.getleavetypes(ak) currentcontext.props.getcategory(ak) currentcontext.props.getprojects(ak) 

on animation end.i have imported nothing related animation , there no code related it.its default animation in react-native.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -