Skip to content

Suggested copy edits to 2 way binding article.#2

Merged
NV merged 1 commit into
NV:masterfrom
asolove:binding-copy
Jun 9, 2014
Merged

Suggested copy edits to 2 way binding article.#2
NV merged 1 commit into
NV:masterfrom
asolove:binding-copy

Conversation

@asolove
Copy link
Copy Markdown
Contributor

@asolove asolove commented Jun 9, 2014

No description provided.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this isn't quite right. The virtual DOM is working fine. What this illustrates is actually an issue with React's philosophy of only storing the minimum of state and re-calculating as much as possible on the fly rather than storing lots of state and using bindings to sync it. If you show, and let users edit, calculated values rather than stored ones, you need to have functions a->b and b->a that work precisely, so that a->b->a is always exactly a.

If you don't, you'll need to do something like storing both pieces of state and updating one when the other changes.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

5e0bbaa Any better?

NV added a commit that referenced this pull request Jun 9, 2014
Suggested copy edits to 2 way binding article.
@NV NV merged commit e5697d1 into NV:master Jun 9, 2014
@NV
Copy link
Copy Markdown
Owner

NV commented Jun 9, 2014

Thanks a lot!

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