package server-reason-react
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Rendering React components on the server natively
Install
dune-project
Dependency
Authors
Maintainers
Sources
server-reason-react-0.2.0.tbz
sha256=f7e93b2c24e6420ed7352f5b04ff028ea6ea8b9b91679bbce43aadfcae028f34
sha512=b74f883d8fad95738b7dd9b51f23af27ef1b541939ad9b8ea65cfb0d48a217c2265ca9319e9355c7782bf223a5168ee4ff236677503afa301c8b7b08561fcd8c
doc/server-reason-react.url_native/URL/index.html
Module URL
URL module is universal and has 2 implementations with the same API:
url_jslibrary is a wrapper around theURLAPI in the browser binded with Melange.url_nativelibrary is a native implementation with ocaml-uri (RFC3986 URI parsing library for OCaml).
Setup with dune
Depending on you setup, you would need to add the following dependencies to your `dune` stanzas:
(library
(name ...)
(modes melange)
(libraries (server-reason-react.url_js))
(library
(name ...)
(modes native)
(libraries (server-reason-react.url_native))Usage
let url = URL.make("https://example.com:8080/path?query=1#hash");
URL.protocol(url); (* => Some("https:") *)
URL.hostname(url); (* => "example.com" *)
URL.port(url); (* => Some("8080") *)
URL.pathname(url); (* => "/path" *)
URL.search(url); (* => Some("?query=1") *)
URL.hash(url); (* => Some("#hash") *)URL.SearchParams
module SearchParams : sig ... endURL
val makeExn : string -> tval make : string -> t optionval makeWith : string -> base:string -> tval hash : t -> string optionval host : t -> string optionval hostname : t -> stringval href : t -> stringval origin : t -> string optionval password : t -> string optionval pathname : t -> stringval port : t -> string optionval protocol : t -> string optionval search : t -> string optionval searchParams : t -> SearchParams.tval username : t -> string optionval toString : t -> string sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page