You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am migrating a Remix app to React v7 and I am trying to configure routes properly. I have a page that on Remix was setup like this (file system based routing using folders)
task (layout)
task._index (page)
inside of task._index I had useRouteLoaderData("routes/task") and this would give me the data from task loader when I access localhost:3000/task
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am migrating a Remix app to React v7 and I am trying to configure routes properly. I have a page that on Remix was setup like this (file system based routing using folders)
inside of
task._index
I haduseRouteLoaderData("routes/task")
and this would give me the data fromtask
loader when I accesslocalhost:3000/task
loader:
on RR v7 I setup the same structure like this:
and now
useRouteLoaderData("routes/task")
returns undefined...would someone be able to tell me what am I doing wrong?ps.: tried using
parent
structure too but same resultBeta Was this translation helpful? Give feedback.
All reactions