You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the state is wrapped in {state: state} I believe we'd get the same behaviour even though setState does a shallow merge instead of a complete state replacement.
I hope to have a chance to prepare a PR for this. But I wanted to note it down.
The text was updated successfully, but these errors were encountered:
ethul
changed the title
Potentiall migrate to setState instead of replaceState
Potentially migrate to setState instead of replaceState
Oct 3, 2015
Currently,
replaceState
is used in thewriteState
function.purescript-react/src/React.js
Lines 35 to 37 in cbe6f58
However, from the docs,
replaceState
may be removed in the future.https://facebook.github.io/react/docs/component-api.html#replacestate
Since the state is wrapped in
{state: state}
I believe we'd get the same behaviour even thoughsetState
does a shallow merge instead of a complete state replacement.I hope to have a chance to prepare a PR for this. But I wanted to note it down.
The text was updated successfully, but these errors were encountered: