I think it is not added because this is "standard" merge function and out of scope of react as a rendering library. It is easily written yourself and a lot of utility libraries like lodash also include this function.
The recommended way for splitting state variables is: "...split state into multiple state variables based on which values tend to change together." - reactjs.org/docs/hooks-faq.html#sh...
I think this is because every state change triggers a render. Therefore you probably also see { loading, data, error } variables combined; because they are mostly updated together.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think it is not added because this is "standard" merge function and out of scope of react as a rendering library. It is easily written yourself and a lot of utility libraries like lodash also include this function.
The recommended way for splitting state variables is: "...split state into multiple state variables based on which values tend to change together." - reactjs.org/docs/hooks-faq.html#sh...
I think this is because every state change triggers a render. Therefore you probably also see
{ loading, data, error }
variables combined; because they are mostly updated together.