-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: svelte 5 adapter #5403
feat: svelte 5 adapter #5403
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
The |
Co-authored-by: Simon H <[email protected]>
…able into feat-svelte-5-adapter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@niemyjski Sorry that was on accident. It's open again. |
See this diff. This narrows the type of content based on context. Not saying it's perfect, but without a minimal repro of the issue it's difficult for me to understand and address your specific case. |
Hey @KevinVandy - may we re-open this discussion in anticipation of v5's official release? We discussed some options on releasing the adapter earlier:
|
My vote is just to replace it, use the current version if you need 4.x |
We can go ahead and merge this into the alpha branch soon, but the documentation for svelte state and adapter needs to be updated with this. |
I'll try and work on it this weekend. |
Hi, I know that v9 is still an alpha, however I am already using it with Svelte 5. Would it be possible to push a new release tag to have a more up to date version of the alpha available for npm? |
The next large alpha release will be in a couple weeks probably |
Gotcha, thanks for the reply.I was asking because the examples (for svelte) in the latest alpha branch commit are not compatible with alpha 9, so I don't know exactly what I should use.
|
Hello, just looking to try out TanStack with Svelte 5. I went to the TanStack installation page which say this:
This points to this PR. Now it appears the PR is merged into alpha? So I guess possibly the documentation might need a slight change, now that the PR is merged, how would the Basic Example work for importing this?
I saw that Thanks! |
@ddxv Things are rapidly evolving with the Seriously - please don't use alpha in production. Even if it works for you today, at some point it won't. We can't possibly support something so dynamic. The documentation still holds true though. You should be able to copy the implementation shown here to make your own "adapter" using |
@walker-tx thanks for being straight forward. I'll be looking forward for when Svelte 5 is out and officially supported. Thanks! |
After some of the questions on Discord and here, I've put together a reference project so folks can see how they can implement their own Svelte 5 adapter for https://github.com/walker-tx/svelte5-tanstack-table-examples Hopefully, this gives folks a clearer path to value. Full disclosure: I threw this together in a caffeinated frenzy. Once I get some rest, I'll go back over everything with fresher eyes. |
Can we get a new alpha |
@tannerlinsley would it be possible to get a timeline and or more love for svelte 5 (new alpha or something), we have the svelte 5 core team now contributing to tanstack query. This has been a huge pain point for the svelte community. |
This. 100%. |
Ah, I had struggled with the adapter previously, but was able to get it working by using the components from huntabyte/shadcn-svelte (even though the project I was working on did not use Shadcn). Not sure why it worked well for me this time when I struggled in the past but wrote up some notes: |
Overhauls the Svelte adapter so that it's compatible with Svelte 5.
Some overview of the work that was done:
svelte/internal
are removed.createSvelteTable
now returns a signal in lieu of a store. According to @dummdidumm, Stores may eventually be deprecated.flexRender
API is now replaced with a more idiomaticFlexRender
component.FlexRender
employs the use of Svelte 5's new Snippet feature - it made this adapter way simpler.Feedback welcome.
solves #5213