ReactRender v2.0.1 ReactRender View Source
React Renderer
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Given the component_path
and props
, returns html
Same as get_html/2
but wraps html in a div which is used
to hydrate react component on client side
Starts the ReactRender and workers
Stops the ReactRender and underlying node react render service
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Given the component_path
and props
, returns html.
component_path
is the path to your react component module relative
to the render service.
props
is a map of props given to the component. Must be able to turn into
json
Same as get_html/2
but wraps html in a div which is used
to hydrate react component on client side.
This is the preferred function when using with Phoenix
component_path
is the path to your react component module relative
to the render service.
props
is a map of props given to the component. Must be able to turn into
json
Starts the ReactRender and workers.
Options
:render_service_path
- (required) is the path to the react render service relative to your current working directory:pool_size
- (optional) the number of workers. Defaults to 4
Stops the ReactRender and underlying node react render service