package server-reason-react
Module ReactSource
The React library
All of those types are used by the server-reason-react.ppx internally to represent valid React code from the server. It currently different from reason-react-ppx due to a need for knowing the types since ReactDOM needs to render differently depending on the type.
Source
type element = | Lower_case_element of lower_case_element| Upper_case_component of string * unit -> element| Async_component of string * unit -> element Lwt.t| Client_component of {props : client_props;client : element;import_module : string;import_name : string;
}| List of element list| Array of element array| Text of string| DangerouslyInnerHtml of string| Fragment of element| Empty| Provider of element| Consumer of element| Suspense of {}
Source
val memoCustomCompareProps :
(('props * 'props) -> bool) ->
(('props * 'props) -> bool) ->
'a ->
('props * 'props) ->
boolSource
val useSyncExternalStore :
subscribe:((unit -> unit) -> (unit, unit) callback) ->
getSnapshot:(unit -> 'snapshot) ->
'snapshotSource
val useReducerWithMapState :
('state -> 'action -> 'initialState) ->
'initialState ->
('initialState -> 'state) ->
'state * ('action -> unit)Source
val useEffect3 :
(unit -> (unit -> unit) option) ->
('dependency1 * 'dependency2 * 'dependency3) ->
unitSource
val useEffect4 :
(unit -> (unit -> unit) option) ->
('dependency1 * 'dependency2 * 'dependency3 * 'dependency4) ->
unitSource
val useEffect5 :
(unit -> (unit -> unit) option) ->
('dependency1 * 'dependency2 * 'dependency3 * 'dependency4 * 'dependency5) ->
unitSource
val useEffect6 :
(unit -> (unit -> unit) option) ->
('dependency1
* 'dependency2
* 'dependency3
* 'dependency4
* 'dependency5
* 'dependency6) ->
unitSource
val useLayoutEffect2 :
(unit -> (unit -> unit) option) ->
('dependency1 * 'dependency2) ->
unitSource
val useLayoutEffect3 :
(unit -> (unit -> unit) option) ->
('dependency1 * 'dependency2 * 'dependency3) ->
unitSource
val useLayoutEffect4 :
(unit -> (unit -> unit) option) ->
('dependency1 * 'dependency2 * 'dependency3 * 'dependency4) ->
unitSource
val useLayoutEffect5 :
(unit -> (unit -> unit) option) ->
('dependency1 * 'dependency2 * 'dependency3 * 'dependency4 * 'dependency5) ->
unitSource
val useLayoutEffect6 :
(unit -> (unit -> unit) option) ->
('dependency1
* 'dependency2
* 'dependency3
* 'dependency4
* 'dependency5
* 'dependency6) ->
unit