Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Eliom_shared.React.S

module S : sig..end

include React.S
include Eliom_shared_sigs.S
val create : 
  ?eq:('a -> 'a -> bool) ->
  ?default:('a t * (?step:React.step -> 'a -> unit)) option ->
  ?reset_default:bool ->
  'a -> 'a React.signal * (?step:React.step -> 'a -> unit)

create ?eq ?default ?reset_default x produces a pair s, f, where s is a reactive signal, and f is a function for updating the signal.

The initial value of the signal is x, unless default is provided. default, if provided, is used as the signal. reset_default, if set to true (default: false), resets the value of default to x.