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.

    Type Parameters

    • T extends object

    Parameters

    • modelTypeId: string

      Unique model type id.

    • Optional options: RootRefOptions<T>

      Root reference options.

    Returns RefConstructor<T>

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

    Typeparam

    T Target object type.