Skip to content

Inconsistent behavior when unmounting/remounting components (Not StrictMode) #65

@HBake

Description

@HBake

Reproduction on Stackblitz

https://stackblitz.com/edit/vitejs-vite-v9qnbh?file=src%2Fmain.tsx

  • Switching from a nested-molecule route to a num-molecule route results in a new value being created.
  • Other route-switch types do not result in a new value.

Possibly related to #58 and/or #64

I am aware of the workaround of using the molecule in a root component. I want the molecule to be unmounted if I visit a different route that doesn't use it instead though.

Edit: Here's a simpler reproduction with no react-router https://stackblitz.com/edit/vitejs-vite-pqhs2r?file=src%2Fmain.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions