Closed AndreVallestero closed 1 year ago
This should actually be a combination of setSearchParams
(for queryString concatenation) and Link
/ A
as a custom component (SoftLink).
https://github.com/solidjs/solid-router/blob/2b503ad2d65270b94f34be5d7ab348284f3d6e32/src/routing.ts#L99 https://github.com/solidjs/solid-router/blob/main/src/components.tsx#L201
The props should be (params: SetParams, options?: Partial<NavigateOptions>
, very similar to setSearchParams
. NavigateOptions gives us the ability to use the replace
flag when needed, and default to concatenating the query string:
export interface NavigateOptions<S = unknown> {
resolve: boolean;
replace: boolean;
scroll: boolean;
state: S;
}
Actually, we might want to use solid-router's
<Link>
tag since it preserves middleclick functionality while not rendering the page