Skip to content

Annotate with comments #7

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Annotate with comments #7

wants to merge 4 commits into from

Conversation

gaearon
Copy link
Member

@gaearon gaearon commented May 5, 2016

This was a bit hard for me to read because of all the existing preconceptions about how React works.

As I read through this, I tried to annotate it with comments to help me (and maybe other people) understand what’s really going on here. Partial application with bind() makes it especially confusing due to “invisible” arguments you have to keep a track of.

Not sure if you’d like to take this but I gave it a try.

memoizationCache.get(child.key)
// When the UI changes, it usually happens just in some parts of the screen.
// This means that most children with the same keys will likely render to the same output.
// We give each child each own memoization map, so that in the common case its output can be memoized.

Choose a reason for hiding this comment

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

I think you meant "We give each child its own ..."

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, thanks.

@vasanthk
Copy link

Thanks @sebmarkbage and @gaearon.
+1 for merging this.

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.

3 participants