-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Since your project is AMAZING, I was wondering what do you think about creating a "kit for Kit" with Svelte 5 that allows us to save in the page URL any POJO object or scalar type we need with the serializer we need (for example I can use JSON.stringify() and JSON.parse() for now).
I described something similar here.
This would be amazing for lists filters for example:
-
I have a players list on page
/players -
I order the list by created_at DESC
-
the kit saves this filter in the URL:
/players?order_by=created_at_DESC(just an example) -
I filter players form team_id: 123
-
the kit saves this new filter in the URL:
/players?order_by=created_at_DESC&team_id=123(just an example) -
I go back with the browser and the URL is now again:
/players?order_by=created_at_DESC(just an example) -
I reload the page now and since the URL is this the list is ordered like before the reload
I hope you get the idea.
I now can manually add this using in each place I need it url.searchParams.set and afterNavigate but I would like to have an helper to be used everywhere.
Again, thanks for your work!