We've done that as well in places. But I was mostly looking for an example of how to access extra data during an update. Another example from our codebase is accessing the User record (name, email address, etc) which we store at the top of the session model. The updater for a more specific state can send an out message up the stack to get the user record for use in the update without needing to store a copy of the data in the state or plumb through passing it down everywhere. That said, it isn't clear how that plumbing compares to the out message plumbing which is not insubstantial. But using out messages to retrieve values does avoid having huge and seemingly haphazard parameter lists.
Mark On Tue, Mar 21, 2017 at 3:20 PM, 'Rupert Smith' via Elm Discuss < [email protected]> wrote: > On Tuesday, March 21, 2017 at 6:27:01 PM UTC, Mark Hamburg wrote: >> >> P.P.S. If you want your mind more deeply twisted, here is what we do when >> we want to store the auth token fairly high up but a piece of code needs it >> for constructing an HTTP request: >> > > Why not use a secure cookie? Then the browser adds it to the request for > you. It is also more secure and has the advantage that if the user > CTRL+clicks a link in your application opening up the same application in > >1 tab, that the cookies flow across automatically. > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
