Package io.kvision.react

KVision bindings for embedded React components.

Types

React
Link copied to clipboard
class React<S>(state: S, className: String?, builder: RBuilder.(getState: () -> S, changeState: ((S) -> S) -> Unit) -> Unit) : Widget, ObservableState<S>
React component for KVision with support for state holder.

Functions

kv
Link copied to clipboard
fun RBuilder.kv(builder: Container.() -> Unit)
An extension function to simplify kvisionWrapper usage.
kvisionWrapper
Link copied to clipboard
fun kvisionWrapper(builder: Container.() -> Unit): FunctionComponent<PropsWithChildren>
A helper functional component which allows to use KVision components as React children.
react
Link copied to clipboard
fun Container.react(className: String? = null, builder: RBuilder.() -> Unit): React<dynamic>
DSL builder extension function.
fun <S> Container.react(state: S, className: String? = null, builder: RBuilder.(getState: () -> S, changeState: ((S) -> S) -> Unit) -> Unit): React<S>
DSL builder extension function.
reactBind
Link copied to clipboard
fun <S> Container.reactBind(state: ObservableState<S>, className: String? = null, builder: RBuilder.(getState: () -> S, changeState: ((S) -> S) -> Unit) -> Unit): React<S>
DSL builder extension function for binding to ObservableStateIt takes the same parameters as the constructor of the built component.
reactWrapper
Link copied to clipboard
fun <S> reactWrapper(builder: RBuilder.(refresh: StateSetter<S>) -> Unit): FunctionComponent<PropsWithChildren>
A helper functional component used by KVision React.