square / flow

Name UI states, navigate between them, remember where you've been.
Apache License 2.0
2.79k stars 241 forks source link

Adds Flow#updateHistory(HistoryUpdater) #239

Closed rjrjr closed 7 years ago

rjrjr commented 7 years ago

In response to the discussion in #197. Allows app code to mutate the history safely despite the raciness of asynchronous transitions.

rjrjr commented 7 years ago

Note that exposing HistoryUpdater.DoSet is very intentional. I have had to replicate that in app code more than once, can't imagine I'm the only one.

edenman commented 7 years ago

I like this alot.

rjrjr commented 7 years ago

Offline discussion w/@loganj, we're reluctant to open this up hook without thinking about it a bit more. Is the queue really something we should be exposing even more like this, or would that get in the way of a longer term vision that eliminates the need for it?