@scaflo/use-hooks - v0.1.0
    Preparing search index...

    Function useCookie

    • useCookie - read/write a cookie (generic T for structured values) returns [value, setValue, remove]

      Type Parameters

      • T = string

      Parameters

      • name: string
      • OptionalinitialValue: T
      • Optionaloptions: CookieOptions

      Returns readonly [
          null
          | string
          | T,
          (
              next: string | T | ((prev: null | string | T) => string | T),
              opts?: CookieOptions,
          ) => void,
          () => void,
      ]