Syntax Lookup

Enter some language construct you want to know more about.
This is the ref mutable reference syntax.

Use ref(value) to create a mutable reference cell. Read via .contents and update via :=.

Example

ReScriptJS Output
let counter = ref(0)

counter := counter.contents + 1

References