Skip to content

docs: Document RxDocument immutability and lifetime behavior in rx-document.md#7929

Merged
pubkey merged 5 commits intomasterfrom
copilot/update-rx-document-with-issues
Mar 4, 2026
Merged

docs: Document RxDocument immutability and lifetime behavior in rx-document.md#7929
pubkey merged 5 commits intomasterfrom
copilot/update-rx-document-with-issues

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

  • Read issue [Potential Documentation Improvement] Question on Lifetime of RxDocument instances #7913 and understand the questions being asked
  • Read the existing rx-document.md documentation
  • Add a new "Document Lifetime and Immutability" section to docs-src/docs/rx-document.md
    • Cover RxDocument immutability (instances are snapshots, not live references)
    • Cover de-duplication behavior
    • Cover CONFLICT errors from outdated instances and how to avoid them
    • Cover caching/lifetime best practices (treat like plain JSON, RxDB handles caching)
    • Clarify when to use getLatest(), incremental methods, or re-querying
  • Move the section to below isRxDocument as requested
  • Add link to Transactions, Conflicts and Revisions page in the CONFLICT error paragraph
  • Remove introductory line from Document Lifetime and Immutability section

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Copilot AI changed the title [WIP] Add user answers to rx-document documentation docs: Document RxDocument immutability and lifetime behavior in rx-document.md Mar 4, 2026
@pubkey
Copy link
Owner

pubkey commented Mar 4, 2026

@copilot Move the section down under isRxDocument

@pubkey
Copy link
Owner

pubkey commented Mar 4, 2026

@copilot link to the page where it shows how to handle conflicts in RxDB

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot Move the section down under isRxDocument

Done. Moved the "Document Lifetime and Immutability" section to below isRxDocument in c9242d4.

…y section

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot link to the page where it shows how to handle conflicts in RxDB

Added a link to Transactions, Conflicts and Revisions in the CONFLICT error paragraph in commit 1b7954c.


## Document Lifetime and Immutability

Understanding how `RxDocument` instances behave over time is important for writing correct code.
Copy link
Owner

Choose a reason for hiding this comment

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

remove this line @copilot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in commit c22eb92.

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
@pubkey pubkey marked this pull request as ready for review March 4, 2026 13:54
@pubkey pubkey merged commit e15df6a into master Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants