Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 605 Bytes

todo.md

File metadata and controls

2 lines (2 loc) · 605 Bytes
  • There is an issue with useMutastate If you useMutastate in a sub component (say a connected input) and the parent component relies on a state variable to render the connected sub component, then in a function update that state variable, and in the setState callback modify the mutastate value, the connected sub component will have the old value and won't get notified of the new value because of the delay when calling useEffect (I think). One way to solve this could be checking the value inside the useEffect, if it has updated we could modify the local copy again, this may risk an infinite loop.