package server-reason-react

  1. Overview
  2. Docs
Rendering React components on the server natively

Install

dune-project
 Dependency

Authors

Maintainers

Sources

server-reason-react-0.4.0.tbz
sha256=7811cd16a7256edbebd06057072142fc2fa1d81de784442e21f3225f06f08ce2
sha512=d60084b34f4086bc401f5f1e209714ab297b5dd94b9b55050816ba9dd0579b2c88745b1813ab57d9584c826af9602df279e8ecfdc04cde62f94d1fec9506dd45

doc/server-reason-react.react/React/JSX/index.html

Module React.JSXSource

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.

Sourcetype event =
  1. | Drag of Event.Drag.t -> unit
  2. | Mouse of Event.Mouse.t -> unit
  3. | Selection of Event.Selection.t -> unit
  4. | Touch of Event.Touch.t -> unit
  5. | UI of Event.UI.t -> unit
  6. | Wheel of Event.Wheel.t -> unit
  7. | Clipboard of Event.Clipboard.t -> unit
  8. | Composition of Event.Composition.t -> unit
  9. | Transition of Event.Transition.t -> unit
  10. | Animation of Event.Animation.t -> unit
  11. | Pointer of Event.Pointer.t -> unit
  12. | Keyboard of Event.Keyboard.t -> unit
  13. | Focus of Event.Focus.t -> unit
  14. | Form of Event.Form.t -> unit
  15. | Media of Event.Media.t -> unit
  16. | Inline of string

All event callbacks

Sourcetype prop =
  1. | Action : (string * string * _ Runtime.server_function) -> prop
  2. | Bool of string * string * bool
  3. | String of string * string * string
  4. | Style of (string * string * string) list
  5. | DangerouslyInnerHtml of string
  6. | Ref of domRef
  7. | Event of string * event

JSX.prop is the representation of HTML/SVG attributes and DOM events

Helpers to create JSX.prop without variants, helpful for function application

Sourceval bool : string -> string -> bool -> prop
Sourceval string : string -> string -> string -> prop
Sourceval style : (string * string * string) list -> prop
Sourceval dangerouslyInnerHtml : < __html : string.. > -> prop
Sourceval int : string -> string -> int -> prop
Sourceval float : string -> string -> float -> prop
Sourceval ref : domRef -> prop
Sourceval event : string -> event -> prop
Sourcemodule Event : sig ... end