-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Collection Cache with Strong References #4209
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8ca67ee
to
56bc8f9
Compare
295a21e
to
0942280
Compare
94ca4e9
to
f7e15e6
Compare
takameyer
added a commit
that referenced
this pull request
Jan 19, 2022
* Use Strong References * Replace extra data rerender mechanism by just returning a new empty proxy
takameyer
added a commit
that referenced
this pull request
Jan 25, 2022
* Use Strong References * Replace extra data rerender mechanism by just returning a new empty proxy
takameyer
added a commit
that referenced
this pull request
Jan 26, 2022
* Use Strong References * Replace extra data rerender mechanism by just returning a new empty proxy
takameyer
added a commit
that referenced
this pull request
Feb 10, 2022
* Use Strong References * Replace extra data rerender mechanism by just returning a new empty proxy
takameyer
added a commit
that referenced
this pull request
Feb 14, 2022
* Use Strong References * Replace extra data rerender mechanism by just returning a new empty proxy
takameyer
added a commit
that referenced
this pull request
Feb 14, 2022
* Use Strong References * Replace extra data rerender mechanism by just returning a new empty proxy
takameyer
added a commit
that referenced
this pull request
Feb 17, 2022
* Use Strong References * Replace extra data rerender mechanism by just returning a new empty proxy
takameyer
added a commit
that referenced
this pull request
Mar 3, 2022
* Use Strong References * Replace extra data rerender mechanism by just returning a new empty proxy
takameyer
added a commit
that referenced
this pull request
Mar 7, 2022
* Add launch command for jest * Documentation of Realm React Add tsdoc notation to the public facing interfaces to realm/react. Also add comments to any possibly unclear blocks of code * Rearrange tsdocs for hooks and provider If one ctrl-clicks on the hooks or the provider in vscode, it navigates to the interface of createRealmContext. The comments have been moved here so the documentation can be found faster. * Add render tests to prove modifications ensure no unnecessary re-renders. * Collection Cache with Strong References (#4209) * Replace extra data re-render mechanism by just returning a new empty proxy * Support sorted and filter Deletions will cause the cache to be cleared. We have to live this this until the listener callbacks provide the ability to retrieve the objectId of the deleted object. * Refactor Test Suite Make use of description.each to test different types of collections. This includes sorted and filtered to show failing tests that must be fixed in the implementation of `cachedCollection`. * Add ability to debug the current open js file using node. * Support List property in useObject (#4274) * Phase 2: Add cache support for Realm.List in Realm.Object Introduces the cachedObject which adds a proxy around a Realm.Object to handle re-rendering on changes and to cache references to all Realm.Objects within a Realm.List. * Fix types for Object Listener When a class extends Realm.Object, adding a listener to an instance of the object would not correctly type the object returned in the callback. With this change, the callback returns an object of the same type as the instance it was called from. * Refactor useObject render tests into a single test suite * Rename example to testApp and remove old code. * Add tests for lists within a collection
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What, How & Why?
Since WeakRef is not supported in Hermes or JSC on Android, the code has been refactored to use strong references to accessed Realm Objects.
This PR also addresses the issue of a collection object reference being updated on relevant changes, by manually triggering on any changes and returning the collection wrapped in an empty proxy.
☑️ ToDos
Compatibility
label is updated or copied from previous entryBreaking
label has been applied or is not necessaryIf this PR adds or changes public API's: