Skip to content

createSelector fails with Suspense #666

Description

@ibosev

I created a new project from the template projects to test some of solid functionalities. Wanted to try createSelector to listen to location pathname changes and set active class in navigation.
https://github.com/ibosev/solid-template/blob/140a18a4f034cf83ef4c2c9eeaaf82c5997c5401/src/app.tsx#L17

It all works for all routes, but /about. Seems that about page, as it has a component breaks the selector and it is never called again after rendering the component.
https://github.com/ibosev/solid-template/blob/140a18a4f034cf83ef4c2c9eeaaf82c5997c5401/src/app.tsx#L39

To Reproduce

  1. Go to page/route without Suspense component. Selector gets called and classList gets updated.
  2. Switch to component with Suspense. Selector gets called and classList gets updated.
  3. Switch back to another component without Suspense. Selector never gets called again, classList no longer updated.

Code: https://github.com/ibosev/solid-template

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions