Skip to content

[queryParamsStore] enhancements #37

@frederikhors

Description

@frederikhors

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:

  1. I have a players list on page /players

  2. I order the list by created_at DESC

  3. the kit saves this filter in the URL: /players?order_by=created_at_DESC (just an example)

  4. I filter players form team_id: 123

  5. the kit saves this new filter in the URL: /players?order_by=created_at_DESC&team_id=123 (just an example)

  6. I go back with the browser and the URL is now again: /players?order_by=created_at_DESC (just an example)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions