3 ms·
> URL state: the route the user is on now. Read and update window.location; don’t create a second source of truth I've seen so much back and forth on this issu
by disease 7y ago
> URL state: the route the user is on now. Read and update window.location; don’t create a second source of truth
I've seen so much back and forth on this issue during my time developing with React. Intuitively, it seems like the URL should be treated the same way that DOM elements are: as a source of actions that may or may not result in state change - in addition to a reflection of state.