Quick Links
  • -Overview
  • -Language Features
  • -JS Interop
  • -Build System
Documentation
Language Manual
Reference for all language features
ReScript & React
First class bindings for ReactJS
GenType
Seamless TypeScript integration
Reanalyze
Dead Code & Termination analysis
Exploration
Packages
Explore third party libraries and bindings
Syntax Lookup
Discover all syntax constructs
APIPlaygroundBlogCommunity
  • Playground
  • Blog
  • Twitter
  • 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 v8.2 - v9.0 docs (Reason v3.6 syntax edition). You can find the latest API docs here.

Storage

t

RES
type t

getItem

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

setItem

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

removeItem

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

clear

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

key

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

length

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

localStorage

RES
@bs.val external localStorage: t = "localStorage"

sessionStorage

RES
@bs.val external sessionStorage: t = "sessionStorage"

© 2024 The ReScript Project

Software and assets distribution powered by KeyCDN.

About
  • Community
  • ReScript Association
Find us on