Skip to content

component with transition directive didn't update correctly when store updated  #4696

@kjj6198

Description

@kjj6198

Describe the bug

When store get updated, I found component with transition directive won't update. It only happens when:

  • store.update() inside Promise then() block, if I move store.update() call to outside, it works as expected.
  • transition directive was added in component.

To Reproduce

demo

  1. click tab2 button, text should be updated to Hello Tab2 (can check console for store detail)
  2. click tab1 button again
  3. click tab2 button again, it now updates.

work around

  • go to Title.svelte, remove transition:fade, rerun it
  • move store.update() outside of then(), rerun it.

Expected behavior
text should be updated.

Severity
small.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions