Hey everyone, I’m looking to make some improvement...
# ballast
c
Hey everyone, I’m looking to make some improvements to the SavedStateAdapter such that you could send multiple Inputs and/or Events after the State has been restored, but I’m not sure the best DSL to use for this. I’d love to get some feedback on the potential ways this could be implemented, and votes on which option you’d prefer. My suggestions are in the 🧵, but feel free to make other suggestions.
Option 1: continue using
restore()
callback, and add functions to
RestoreStateScope
to send Inputs/Events
Option 2: Deprecate
restore()
function and add a new callback with a new return type, which contains the restored State along with the Inputs/Event to send afterwards
r
I like option 1, but I would use just
postInput
and
postEvent
names for the functions.
c
I was thinking the
*AfterRestore
naming would help clarify that they don’t actually get sent until after the method returns and the returned State is fully restored, but it may not be necessary to be so explicit
a
I vote option 1 too.