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 9 commits into
base: main
Choose a base branch
from
Draft

v3 #17

wants to merge 9 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 or other ideas. Feedback welcome and appreciated!

  • 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.
  • Drops hydrate() exports
    • This is a very thin wrapper that a) provides little value and b) is quite hard to name, as it toggles between render() and hydrate() internally and only functions correctly if used w/ iso's prerender().
    • I think we're better off dropping this, it's 4loc to replace in userland and that is much clearer to the user
  • Merged useRoute and useLocation
    • useLocation and useRoute have some overlapping properties and can end up firing between renders, leading to tearing. Consolidating down is ideal IMO.
  • Rename useRoute().params -> pathParams & useRoute().query -> searchParams
    • We match vue-router in our naming but personally I dislike the ambiguity (params can easily refer to both path parameters & query parameters) and a few people I've spoken to seem to agree. These seem to be better & immediately understandable to anyone, regardless of which routers they've used in the past.

To Do:

To Think About:

  • 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.

@rschristian rschristian force-pushed the v3 branch 2 times, most recently from c624b01 to b6f13d1 Compare September 2, 2024 07:22
@rschristian rschristian force-pushed the v3 branch 3 times, most recently from 1f2b71d to 3b0bd37 Compare October 14, 2024 22:23
@rschristian rschristian force-pushed the v3 branch 5 times, most recently from 781b472 to eafea6e Compare February 15, 2025 08:40
@rschristian rschristian force-pushed the v3 branch 4 times, most recently from 5802816 to 84811ca Compare February 15, 2025 09:39
@preactjs preactjs deleted a comment from mike-lischke Feb 26, 2025
@preactjs preactjs deleted a comment from mike-lischke Feb 26, 2025
@preactjs preactjs deleted a comment from mike-lischke Feb 26, 2025
@rschristian rschristian force-pushed the v3 branch 3 times, most recently from 9d31f42 to 379f6e6 Compare March 3, 2025 01:32
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