Skip to content

Instantly share code, notes, and snippets.

@adeleke5140
Last active May 25, 2022 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adeleke5140/3eb0b754bb912d2113ac470a773b625d to your computer and use it in GitHub Desktop.
Save adeleke5140/3eb0b754bb912d2113ac470a773b625d to your computer and use it in GitHub Desktop.
Issue with Duplicate State
//problem is from the useReducer making two changes to say.
const newState = JSON.parse(JSON.stringify(state)) as AppState
newState.lists[targetLaneIndex].tasks.push({
id: uuidv4(),
text: action.payload.text
})
return newState
@adeleke5140
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment