Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ricardobeat
on Feb 6, 2019
|
parent
|
context
|
favorite
| on:
With React 16.8, React Hooks are available in a st...
Apparently React's internals have been doing similar order-based magic for a while already.
Vinnl
on Feb 6, 2019
[–]
That's also the reason why you have to make sure you're passing an update function to `setState` sometimes.
jontro
on Feb 7, 2019
|
parent
[–]
That's not why you have to do it, it's because the state can be updated asynchronously. It's only applicable when you try to update the state based on previous state or props values.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: