package eliom
Advanced client/server Web and mobile framework
Install
Dune Dependency
Authors
Maintainers
Sources
11.0.1.tar.gz
md5=3aeeca5f734f8e932b5a00fbfd43bd26
sha512=d92948949c81fe5b84f7d262b72653175d4f69574cbb4f85433f3a40df436e9e78b3f024ebcd98cb0e1c8ec45af0e3f9cd1153187549883f4ddfd32feeee3176
doc/eliom.server/Eliom_shared/React/S/index.html
Module React.S
Source
Source
val create :
?default:
('a React.S.t * (?step:React.step -> 'a -> unit)) option
Eliom_client_value.t ->
?reset_default:bool ->
?eq:('a -> 'a -> bool) Value.t ->
'a ->
'a t * (?step:React.step -> 'a -> unit) Value.t
create ?default ?reset_default x
produces a pair s, f
, where s
is a (shared) reactive signal, and f
is a shared function for updating the signal.
The initial value of the signal is x
, unless default
is provided. default
, if provided, is used as the client-side signal. reset_default
, if set to true (default: false), resets the value of default
to x
.
The behavior of f
is undefined on the server side. On the client side, f
behaves just like the standard React-provided update functions.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>