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
- Go to page/route without Suspense component. Selector gets called and classList gets updated.
- Switch to component with Suspense. Selector gets called and classList gets updated.
- Switch back to another component without Suspense. Selector never gets called again, classList no longer updated.
Code: https://github.com/ibosev/solid-template
I created a new project from the template projects to test some of solid functionalities. Wanted to try
createSelectorto 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
Code: https://github.com/ibosev/solid-template