kiliman / remix-flat-routes

Remix package to define routes using the flat-routes convention
MIT License
695 stars 24 forks source link

when using a route that has a `+` in it useRouteLoaderData seems to break #68

Closed lifeiscontent closed 1 year ago

lifeiscontent commented 1 year ago

useRouteLoaderData uses the route id to lookup the loader data, but from what I can tell this breaks the useRouteLoaderData hook

  const data = useRouteLoaderData<typeof layoutLoader>("routes/_app+/_layout");
kiliman commented 1 year ago

Did you figure it out?

lifeiscontent commented 1 year ago

@kiliman yeah thanks for checking in! It was a typo on my part, once I saw what useMatches returned it all made sense 😅