solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

Two routes page render at same time

Open harshmangalam opened this issue 1 year ago • 1 comments

My folder structure looks like this

- routes
    - (auth).tsx
    - (auth)
        - login.tsx
    - [...404].tsx

When i remove (auth).tsx from routes now when i visit /login it render both 404 page and login page. And <HttpStatusCode code={404} /> folder will throw error TypeError: Cannot read properties of null (reading 'nextSibling')

harshmangalam avatar Nov 30 '22 07:11 harshmangalam

I can confirm this happens for me too when navigating from the dynamic route /tool/[slug] to the index route /. Sometimes it also renders the dynamic route twice below the index route.

A workaround is to wrap the <ErrorBoundary> inside the route with a <div>. Then it magically works.

EDIT: It also seems that <ErrorBoundary> inside pathless routes doesn't work correctly. Will open a different issue for that because it looks like it could be the cause of this issue here as well.

https://user-images.githubusercontent.com/6840287/205135449-2941ff11-b70d-4c44-a36a-710b00448b01.mp4

m4rvr avatar Dec 01 '22 19:12 m4rvr

Might be caused by a hydration issue triggering the rest. Reproduction would be good thanks.

ryansolid avatar Dec 22 '22 04:12 ryansolid

Might be caused by a hydration issue triggering the rest. Reproduction would be good thanks.

Thanks, Ryan! The reproduction can be found in the mentioned issue #502.

m4rvr avatar Dec 22 '22 13:12 m4rvr

In setting up for SolidStarts next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed in mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

See https://github.com/solidjs/solid-start/pull/1139 for more details.

ryansolid avatar Dec 18 '23 23:12 ryansolid