either the desired Realm.Object or null
in the case of it being deleted or not existing.
const object = useObject(ObjectClass, objectId);
Returns a Realm.Object from a given type and value of primary key. The hook will update on any changes to the properties on the returned object and return null if it either doesn't exists or has been deleted.
either the desired Realm.Object or null
in the case of it being deleted or not existing.
const object = useObject(ObjectClass, objectId);
Returns a Realm.Object from a given type and value of primary key. The hook will update on any changes to the properties on the returned object and return null if it either doesn't exists or has been deleted.
The object type, depicted by a string or a class extending Realm.Object
The primary key of the desired object which will be retrieved using Realm.objectForPrimaryKey
Optional
keyPaths: string | string[]Indicates a lower bound on the changes relevant for the hook. This is a lower bound, since if multiple hooks add listeners (each with their own keyPaths
) the union of these key-paths will determine the changes that are considered relevant for all listeners registered on the object. In other words: A listener might fire and cause a re-render more than the key-paths specify, if other listeners with different key-paths are present.
either the desired Realm.Object or null
in the case of it being deleted or not existing.
const object = useObject(ObjectClass, objectId);
Returns a Realm.Object from a given type and value of primary key. The hook will update on any changes to the properties on the returned object and return null if it either doesn't exists or has been deleted.
The object type, depicted by a string or a class extending Realm.Object
The primary key of the desired object which will be retrieved using Realm.objectForPrimaryKey
Optional
keyPaths: string | string[]Indicates a lower bound on the changes relevant for the hook. This is a lower bound, since if multiple hooks add listeners (each with their own keyPaths
) the union of these key-paths will determine the changes that are considered relevant for all listeners registered on the object. In other words: A listener might fire and cause a re-render more than the key-paths specify, if other listeners with different key-paths are present.
either the desired Realm.Object or null
in the case of it being deleted or not existing.
const object = useObject(ObjectClass, objectId);
Generated using TypeDoc
Returns a Realm.Object from a given type and value of primary key. The hook will update on any changes to the properties on the returned object and return null if it either doesn't exists or has been deleted.