Type alias YDocProviderProps

YDocProviderProps: {
    authEndpoint: AuthEndpoint;
    children: ReactNode;
    docId: string;
    initialClientToken?: ClientToken;
    setQueryParam?: string;
}

Props to the YDocProvider component.

Type declaration

  • authEndpoint: AuthEndpoint

    The endpoint to use for authentication or an async function that returns a client token.

  • children: ReactNode

    The children to render.

  • docId: string

    The doc id to use for the Y.Doc.

  • Optional initialClientToken?: ClientToken

    An optional initial client token to use for the Y.Doc. This will be used initially, and if the client token expires, the authEndpoint will be called to get a new client token.

  • Optional setQueryParam?: string

    If set to a string, the URL query parameter with this name will be set to the doc id provided.