Function rootRef

Creates a root ref to an object, which in its snapshot form has an id. A root ref will only be able to resolve references as long as both the Ref and the referenced object share a common root.

T Target object type.

  • Type Parameters

    • T extends object

    Parameters

    • modelTypeId: string

      Unique model type id.

    • Optionaloptions: RootRefOptions<T>

      Root reference options.

    Returns RefConstructor<T>

    A function that allows you to construct that type of root reference.