DocsAPISyntaxReactPlaygroundBlogCommunity
  • Playground
  • Blog
  • Community
  • X
  • Bluesky
  • GitHub
  • Forum
Dom Module
Overview
  • Dom
Submodules
  • Storage
    • t
    • clear
    • getItem
    • key
    • length
    • localStorage
    • removeItem
    • sessionStorage
    • setItem
  • Storage2
API / Dom / Storage

You are currently looking at the v6.0 - v8.2 docs (Reason v3.6 syntax edition). You can find the latest API docs here.

(These docs cover all versions between v3 to v8 and are equivalent to the old BuckleScript docs before the rebrand)

Storage

t

RE
type t

getItem

RE
external getItem: (string, t) => option<string> = "getItem"

setItem

RE
external setItem: (string, string, t) => unit = "setItem"

removeItem

RE
external removeItem: (string, t) => unit = "removeItem"

clear

RE
external clear: t => unit = "clear"

key

RE
external key: (int, t) => option<string> = "key"

length

RE
external length: t => int = "length"

localStorage

RE
[@bs.val] external localStorage: t = "localStorage"

sessionStorage

RE
[@bs.val] external sessionStorage: t = "sessionStorage"

© 2025 The ReScript Project

Software and assets distribution powered by KeyCDN.

About
  • Community
  • ReScript Association
Find us on