View Source Komodo.Components (komodo v0.2.1)
Summary
Functions
Function component for rendering javascript components
Functions
Function component for rendering javascript components
It uses a "props-in, callbacks-out" data-flow, so for example a React component that is used in React like so:
<MyComponent count={43} onIncrement={() => handleIncrement()} />
would be rendered from a live view as
<.js_component name="MyComponent" props={%{count: 43}} callbacks={%{onIncrement: "increment"}} />
where "increment"
is the event name sent back to the live view.
Attributes
tag_name
(:atom
) - Defaults to:div
.id
(:string
) (required)name
(:string
) (required)props
(:map
) - Defaults to%{}
.callbacks
(:map
) - Defaults to%{}
.class
(:string
) - Defaults to""
.style
(:string
) - Defaults to""
.