• Register a stream model on this client using React hooks.

    Type Parameters

    • State

    Parameters

    • client: Client

      The client to register the stream model with.

    • domain: string

      The domain of the stream model.

    • model: StreamModel<State>

      The stream model to register.

    • streamProps: StreamProps

      The props to spawn the stream model with.

    Returns {
        dispatch: ((event) => boolean);
        use: (() => State);
    }

    An object with methods to use and dispatch events to the stream model.

    • dispatch: ((event) => boolean)
        • (event): boolean
        • Parameters

          • event: Message

          Returns boolean

    • use: (() => State)