denoland / fresh

The next-gen web framework.
https://fresh.deno.dev
MIT License
12.25k stars 627 forks source link

Docs: Change cart example to not used shared signals #2437

Open marvinhagemeister opened 4 months ago

marvinhagemeister commented 4 months ago

The example on https://fresh.deno.dev/docs/examples/sharing-state-between-islands shares signals on the module level which would mean that all requests would share the same signal. This is not a good default. We should rewrite the example so that each request gets a new cart signal and that the islands receive the cart as props.