Replies: 2 comments
-
Layout _pathless.category.tsx has a loader to fetch all categories. Removed the loader and hard coded the categories and it is working now. Need to check why loader in the layout is causing this issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing this. It is not layout issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It works pefectly with the above structure. However I require another layout file for category section. So when I create another file like this
This doesnt seem to work. First time load on /category and /category/<cat_name> loads the
_pathless.category.tsx
layout correctly but subsequent navigation to other categories gives "rules of hooks"Whats the right way to achieve a layout for category inside _pathless.
Update: To give more context,
Update 2: These are the routes ( using remix-flat-routes )
Its working for some clicks, and not working for some other clicks. Looks like some race condition on the client side ? Perfectly getting rendered on initial page load.
Beta Was this translation helpful? Give feedback.
All reactions