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

v3 #17

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

v3 #17

wants to merge 4 commits into from

Conversation

rschristian
Copy link
Member

@rschristian rschristian commented Apr 11, 2024

Ideas for v3, as I'll forget them otherwise. Certainly not set in stone if anyone has concerns.

  • Drop all subpath exports besides ./prerender
    • I believe this was the eventual intention back in the WMR days. I want to keep /prerender, and only offer the prerender script through it, to avoid some headaches with the RTS optional peer dep (see fix: RTS peer dep w/ Vite #13)
  • Makes RTS an optional peer dep again
    • It's a minor thing but I'd prefer users having easier control over the versioning as iso is a really shallow wrapper around it.

To Do:

  • Merge useRoute and useLocation
    • useLocation and useRoute have some overlapping properties and can end up firing between renders, leading to tearing. Consolidating down is ideal, though it might complicate the route data.
    • Alternatively, we might keep useLocation as a "loading/fetching" mechanism, and useRoute as a reaction?
      • There's a bit of an issue in that the user can't easily watch the path and run some code on URL change -- if the component suspends, the URL will change before the new data has become available. We don't really have a good answer for that at the moment.
  • hydrate() definitely needs a better name
  • useRoute().query -> queryParams, useRoute().params -> pathParams?
    • Might just be me, but half the time I use .params expecting to find the query params in there
  • useLocation().url and useLocation().path will just about always match
  • At least loosely align with the URL Pattern spec
    • Probably the future of every router, we should try to ensure parity so we can easily switch to it in the future without further changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant