I am a Software Engineer, currently working on both web application development and mobile application development. Learning new things and sharing those with fellow developers!
Pending state starts while generating the promise, until it is either resolved or rejected. That means, until you get any result, successful or failure, the state is pending.
Well, if you working with React or React Native, in that case you can set the initial state as pending state, set resolve in then section and set reject in catch section. I'll write about it later in another post clearly.
You can use defualt state with pending string and then after resolve you can change state with resolve and in catch section set state with reject !
If you mean state in React 😂
I am a Software Engineer, currently working on both web application development and mobile application development. Learning new things and sharing those with fellow developers!
Is there a way to get states? Such as pending...?
Pending state starts while generating the promise, until it is either resolved or rejected. That means, until you get any result, successful or failure, the state is pending.
Well, if you working with React or React Native, in that case you can set the initial state as pending state, set resolve in then section and set reject in catch section. I'll write about it later in another post clearly.
You can use defualt state with pending string and then after resolve you can change state with resolve and in catch section set state with reject !
If you mean state in React 😂
Correct