Realm React v0.7.0
Deprecations
-
Deprecated calling
useQuery
with three positional arguments. (#6360)Please pass a single "options" object followed by an optional
deps
argument (if your query depends on any local variables):const filteredAndSorted = useQuery({ type: Object, query: (collection) => collection.filtered('category == $0',category).sorted('name'), }, [category]);
Enhancements
- Adding the ability to pass "options" to
useQuery
anduseObject
as an object. (#6360) - Adding
keyPaths
option to theuseQuery
anduseObject
hooks, to indicate a lower bound on the changes relevant for the hook. This is a lower bound, since if multiple hooks add listeners (each with their ownkeyPaths
) the union of these key-paths will determine the changes that are considered relevant for all listeners registered on the collection or 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. (#6360)
Fixed
- Removed race condition in
useObject
. (#6291) Thanks @bimusik! - Fixed flickering of the
RealmProvider
'sfallback
component and itschildren
when offline. (#6333)
Compatibility
- React Native >= v0.71.4
- See "Compatibility" for a specific Realm version in Realm's CHANGELOG.