Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds types to @redwoodjs/Router #791

Closed
12 tasks done
peterp opened this issue Jul 2, 2020 · 1 comment
Closed
12 tasks done

Adds types to @redwoodjs/Router #791

peterp opened this issue Jul 2, 2020 · 1 comment

Comments

@peterp
Copy link
Contributor

peterp commented Jul 2, 2020

We would like to add type definitions to @redwoodjs/router instead of converting it to typescript. Once the types are added we can look into converting the package, but this gives us a quick path forward.

I'm using a combination of the documentation and the code to inform the types. It would be great to include as much documentation and examples in the type definitions as possible.

Components

hooks

  • useLocation
  • useParams
  • useMatch
  • usePageLoadingContext

Functions

NOTE A dynamic list of "named routes" is created when the <Router> is instantiated. These are referenced in a bunch of the components and the route.namedRoute() function.

We currently have a babel-plugin that deals with a bunch of dynamic route functionality that we would like to use to generate these dynamic routes.

@peterp
Copy link
Contributor Author

peterp commented Sep 10, 2020

Closed by #1110

@peterp peterp closed this as completed Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant