🍡 mochi

Cookies

Unified cookies API from 'mochi-framework'. Read and write cookies on the server and the client with the same accessor.

<script>
  import CookieDemo from './CookieDemo.svelte';

  const cuteNames = ['mochi_fan', 'bun_bun', 'pixel_panda', 'tiny_tanuki', 'cloud_kitten', 'waffle_fox', 'cocoa_bear', 'starry_otter', 'maple_duck', 'peach_pup'];
  const randomCuteName = cuteNames[Math.floor(Math.random() * cuteNames.length)];
</script>

<CookieDemo defaultUsername={randomCuteName} mochi:hydrate />