logoalt Hacker News

pscanftoday at 5:32 PM0 repliesview on HN

Yeah, implementing it with data flowing one-way only from the URL to the state is cleaner.

Conceptually, however, I prefer to think of my state being at the center of things. I mean, that's where I define (via types) what the state is. The URL is just one serialization of that state that is convenient to use in a web browser (making it work with links, back/forth buttons, etc). Maybe in another environment another serialization would be needed. Or maybe no serialization could be needed at all (making it a memory router).