package server-reason-react
Rendering React components on the server natively
Install
Dune Dependency
Authors
Maintainers
Sources
server-reason-react-0.3.0.tbz
sha256=2a6fc7197d251dc91babcf22cb6987e1d07e91ae631cc62a893df2c6da6b49b5
sha512=c6ed6eb39b046b698844e561cf9a42a866e4df632a6e495a6473ba629ecd9ee534db0b5b42737776d9a4b15376bea1380b77749228c88a0fc0f6b10ead4b3a01
doc/src/server-reason-react.runtime/Runtime.ml.html
Source file Runtime.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
exception Impossible_in_ssr of string let fail_impossible_action_in_ssr fn = let backtrace = Printexc.get_callstack 8 in let raw_callstack = Printexc.raw_backtrace_to_string backtrace in let () = Printf.printf {|'%s' should only run on the client. Make sure you aren't accidentally calling this function in a server-side context. Here's the raw callstack: %s |} fn raw_callstack in raise (Impossible_in_ssr (Printf.sprintf {|'%s' shouldn't run on the server|} fn)) type platform = Server | Client
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>