Skip to content

correct way to reuse on multiple components #178

@ak4zh

Description

@ak4zh

I am building a big form which is spread across multiple components, what is the correct way to get queryParameters in all components? Should I use .svelte.ts for this or simply instantiate params = queryParameters() on every component.

This results in cannot subscribe to page store in server error

import { queryParameters, ssp } from "sveltekit-search-params";

class Search {
    filters = queryParameters({
        keyword: ssp.string()
    });
}

export const search = new Search();

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