Skip to content

consider removing all data from DocumentRefs #20

@scien

Description

@scien

problem state i just discovered...

  • data is updated
  • ref catches update and changes its @data
  • ref emits event
  • event handler used ref.get('property').val() // ISSUE: property was out of date
  • ref updates @document.data

ref.get passes the document and the path, it ignores local data, so the document data had to be updated before emitting events. I can't think of any benefit to duplicating the data in the DocumentRef at all now. I think the val() call should just always ask the document what the value at its path is.

only tricky thing i can think of is if you have a ref listener it would have to tell the document to update that part of its data. going to sit on this for a little bit and think it over.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions