DEV Community

Discussion on: JavaScript: Concept of Promise

Collapse
 
moriseif1 profile image
moriseif1

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 😂

Collapse
 
swarnaliroy94 profile image
Swarnali Roy

Correct