Closed dy closed 4 years ago
Yeah, that cannot work, and it wouldn't work in React neither: https://itnext.io/react-async-components-classes-vs-hooks-1a9068b61b3f
You should likely separate data behaviors from hooks logic, as described in the link I've posted.
Function isn't updated here. Is that by design?