Automerge Repo - v2.3.0-alpha.0
    Preparing search index...

    Variable useLocalAwarenessConst

    useLocalAwareness: (
        { handle, userId, initialState, heartbeatTime, }: UseLocalAwarenessProps,
    ) => any[]

    This hook maintains state for the local client. Like React.useState, it returns a [state, setState] array. It is intended to be used alongside useRemoteAwareness.

    When state is changed it is broadcast to all clients. It also broadcasts a heartbeat to let other clients know it is online.

    Note that userIds aren't secure (yet). Any client can lie about theirs.

    Type declaration