Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilized References for Collections, Lists and Objects #5269

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

takameyer
Copy link
Contributor

@takameyer takameyer commented Jan 16, 2023

  • Only update the returned references if a relevant changes occurs
  • This fix will work for:
    • Collections returned from useQuery
    • Collections returned from object.list
    • Object references returned from useObject

This closes #5264

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 📝 Update COMPATIBILITY.md
  • 🚦 Tests
  • 🔀 Executed flexible sync tests locally if modifying flexible sync
  • 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • 📱 Check the React Native/other sample apps work if necessary
  • 📝 Public documentation PR created or is not necessary
  • 💥 Breaking label has been applied or is not necessary

If this PR adds or changes public API's:

  • typescript definitions file is updated
  • jsdoc files updated

@takameyer takameyer force-pushed the andrew/realm-react/useQueryRef branch from 228a79e to 60d4edc Compare January 16, 2023 12:25
@cla-bot cla-bot bot added the cla: yes label Jan 16, 2023
@takameyer takameyer force-pushed the andrew/realm-react/useQueryRef branch 2 times, most recently from 20f20b0 to 0ea7e81 Compare January 16, 2023 12:30
Copy link
Member

@elle-j elle-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

Copy link
Member

@kraenhansen kraenhansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few ideas for naming.

packages/realm-react/src/__tests__/useQueryRender.test.tsx Outdated Show resolved Hide resolved
packages/realm-react/src/cachedCollection.ts Show resolved Hide resolved
packages/realm-react/src/cachedCollection.ts Outdated Show resolved Hide resolved
packages/realm-react/src/cachedObject.ts Outdated Show resolved Hide resolved
* Only update the returned references if a relevant changes occurs
* This fix will work for:
  * Collections returned from `useQuery`
  * Collections returned from object.list
  * Object references returned from `useObject`
@takameyer takameyer force-pushed the andrew/realm-react/useQueryRef branch from 0ea7e81 to 4ebea53 Compare January 17, 2023 11:04
@takameyer takameyer merged commit 93e3bb8 into master Jan 17, 2023
@takameyer takameyer deleted the andrew/realm-react/useQueryRef branch January 17, 2023 11:42
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants