You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ghengeveld talked about this a bit more with @shilman and realised the issue is actually very similar to issues we've faced with the render cycle. A summary of the issue is: What guarantees do we make if a setCurrentStory is received while the previous render process is still ongoing?
There are a few async steps in the "render process" that are relevant:
loading the CSF file (this issue)
cleaning up the previous render (can be async if we need to cancel a play function)
running loaders
rendering the story
running the play function.
I believe we thought a bunch about what happens during steps 3-5 but not at all about steps 1-2. I'm wondering your thoughts -- should we just add them as render phases and handle them in a similar way with the abort controller? Or something else?
Describe the bug
Button:Primary
)Explanation of bug
The issue is that with the async story loading the following sequence of events happens:
a. emits
storySpecified
eventb. starts rendering
renderSelection()
function is running.setCurrentStory
with the selected story (<- this bit is a bit weird but is existing behaviour in SB).renderSelection()
againthis.previousStory
is not yet set.The text was updated successfully, but these errors were encountered: