fresh-with-signals
fresh-with-signals copied to clipboard
Signal passing over the routes
I think this is more a feature request than an issue. My state (signal) is getting lost when I hit another route (despite both routes importing the same state component). I think this is expected, but is there a way to keep the state across routes? My state looks like a copypaste of cart.ts
import { signal } from "@preact/signals";
export const address = signal<string>("");
and I assign the value in a very simple way:
address.value="test";
I can push the whole code somewhere if you think it should actually work fine.