Skip to content

Commit

Permalink
Support List property in useObject (#4274)
Browse files Browse the repository at this point in the history
* Phase 2: Add cache support for Realm.List in Realm.Object

Introduces the cachedObject which adds a proxy around a Realm.Object
to handle rerendering 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.

* Apply suggestions from code review

* Refactor useObject render tests into a single test suite
  • Loading branch information
takameyer authored Feb 17, 2022
1 parent 3dbb581 commit e107d62
Show file tree
Hide file tree
Showing 14 changed files with 46,555 additions and 47,859 deletions.
18 changes: 17 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,25 @@
"cwd": "${workspaceFolder}/integration-tests/tests",
"preLaunchTask": "Build Node Tests"
},
{
"type": "lldb",
"name": "LLDB Realm React Tests",
"request": "launch",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"cwd": "${workspaceFolder}/packages/realm-react",
"program": "node",
"args": [
"node_modules/.bin/jest",
"--runInBand",
"--watchAll=false",
"--testNamePattern=${input:testNamePattern}"
]
},
{
"type": "node",
"name": "vscode-jest-tests",
"name": "Realm React Tests",
"request": "launch",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
Expand Down
204 changes: 150 additions & 54 deletions integration-tests/environments/react-native/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e107d62

Please # to comment.