Clients

Covers Engine 2.0.0

DartwicProvider

Provides a shared DARTWIC client connection and live channel store to a React subtree.

Import

import { DartwicProvider } from "@voit-systems/dartwic.react-client";

Declaration

export function DartwicProvider({
    children,
    implementHeartbeat = true,
    logger = console,
    onError = null,
})

Parameters

NameTypeRequirementDefaultDescription
propsobjectRequiredProvider properties.
props.childrenReact.ReactNodeRequiredComponents that can access the DARTWIC context.
props.implementHeartbeatbooleanOptionaltrueEnables TEMPEST heartbeat handling.
props.loggerobjectOptionalconsoleLogger passed to the TEMPEST web client.
props.onErrorfunction|nullOptionalnullCalled when the TEMPEST client reports an error.

Returns

React.ReactElement — The context provider for the wrapped subtree.