DEV Community

Discussion on: Accessing React State right after setting it

Collapse
 
kayis profile image
K

It's kinda strange that the setState() method doesn't return a promise.

Collapse
 
theodesp profile image
Theofanis Despoudis

React uses a callback style programming mostly as promises are still difficult to grasp and a little bit more expensive.

Collapse
 
kayis profile image
K

True, but in React-Native examples they also use promises and async functions.