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
Add patchState method to get rid of unnecessary state spreading and replace:
// case 1this.moviesStore.setState(state=>({
...state,
movies,}));// case 2this.moviesStore.setState(state=>({
...state,movies: [...state.movies,movie],}));
with:
// case 1this.moviesStore.patchState({ movies });// case 2this.moviesStore.patchState(state=>({movies: [...state.movies,movie],}));
If accepted, I would be willing to submit a PR for this feature
[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No
The text was updated successfully, but these errors were encountered:
Add
patchState
method to get rid of unnecessarystate
spreading and replace:with:
If accepted, I would be willing to submit a PR for this feature
[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No
The text was updated successfully, but these errors were encountered: