package eliom
Advanced client/server Web and mobile framework
Install
Dune Dependency
Authors
Maintainers
Sources
11.1.1.tar.gz
md5=c8c67fe5fb8d3f44a3b17cc4a93a0e62
sha512=e58557a1b525efd011e0eb539b112b53e6c012ac3fb2153c251be030eda483dd3b19de625707cf5ffebd97fa6a7fabfb8a6aae8e8a61c79e0bd7ad2d289df9a9
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)"
>