Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Add June 2 notes #18

Merged
merged 1 commit into from
Jun 6, 2016
Merged

Add June 2 notes #18

merged 1 commit into from
Jun 6, 2016

Conversation

gaearon
Copy link
Member

@gaearon gaearon commented Jun 6, 2016

Feel free to discuss in this PR!

@gaearon gaearon merged commit 1c99fc1 into master Jun 6, 2016
@gaearon gaearon deleted the gaearon-patch-1 branch June 6, 2016 14:44
@DanielMSchmidt
Copy link

Proposal 3 is super cool 👍 It gives developers 100% clarity and control over this functionality.

@chicoxyzzy
Copy link
Contributor

chicoxyzzy commented Jun 6, 2016

I am strictly disagree with second proposal. In my case I'm already sure that if SFCs get new props, this props are really new (not equal to previous) so I need a way to always re-render as fast as possible on new props without any checks

* Intuitively, people expect SFCs to behave like functions. The bailout would be surprising, and there isn’t a particularly good way of discovering why the function isn’t behaving like a normal JavaScript function.
* Performance. It’s not clear that adding `PureRenderMixin` to every SFC would actually improve overall performance (because it means extra reads/compares, retaining objects longer and into subsequent GC generations, etc).

#### Proposal 3: `createPureElement`

Choose a reason for hiding this comment

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

This seems really clean. I like the <*Component /> syntax, though I think pure={true} better fits what my expectation would be if someone asked me 'how do you tell if a component implements (formerly) PureRenderMixin?'

The downside would be that the calling component must have additional information on the expectations of the component. I suspect folks would just end up defining pure: true in getDefaultProps.

Copy link
Member Author

Choose a reason for hiding this comment

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

@spicyj @jimfb @sebmarkbage

Has there been a discussion of pros and cons of the third approach? I missed the meeting so I can’t tell 😄 .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy