React: [Documentation] Examples on PureComponent Vs Component

Created on 10 Nov 2016  路  8Comments  路  Source: facebook/react

In here https://facebook.github.io/react/docs/react-api.html#react.purecomponent I think it would be nice to have some examples comparing PureComponent against Component

Most helpful comment

Cool, let me close this issue & we can continue the discussion on that PR. Thanks!

All 8 comments

Do you think the examples in https://facebook.github.io/react/docs/optimizing-performance.html are good enough? If so perhaps we could just link over there from the reference docs.

Yes! I wanted to show PureComponents to a co-worker and he found that hard to understand bc they weren't examples on that page and I sent him that same link so I think it would be nice to have a link there from the pure component page

Is it discouraged to use Pure Component? Because I also agree that the documentation is a little scattered on it

@lucas-aragno OK - want to send a PR just adding a line linking to the examples?

@mmdonaldson It isn't discouraged, no.

@lacker sure will do

@lacker @lucas-aragno I think an example of the direct comparison should be added as well with the link. Would be helpful.

sent #8477

Cool, let me close this issue & we can continue the discussion on that PR. Thanks!

Was this page helpful?
0 / 5 - 0 ratings