chore(docs): add clarification that state.tr is an accessor #25

Merged
neaumusic merged 1 commit from patch-1 into master 2024-09-05 21:54:30 +02:00
neaumusic commented 2024-09-05 20:53:40 +02:00 (Migrated from github.com)

In the past, I had issues for a while trying to figure out why I couldn't use state.tr directly, and had to reassign it. I think the most legible would be state.tr() or state.createTransaction() where it would be expected to be a different memory reference each time, but adding a little more detail in the comment should help others.

In the past, I had issues for a while trying to figure out why I couldn't use `state.tr` directly, and had to reassign it. I think the most legible would be `state.tr()` or `state.createTransaction()` where it would be expected to be a different memory reference each time, but adding a little more detail in the comment should help others.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-state!25
No description provided.