React-virtualized: Replace react-addons-shallow-compare with PureComponent?

Created on 17 Nov 2016  路  9Comments  路  Source: bvaughn/react-virtualized

According to the docs, react-addons-shallow-compare is a legacy addon. Have you considered replacing it with React.PureComponent?

Most helpful comment

We can revisit once React 16 lands _or_ with the next major react-virtualized released. 馃槃

All 9 comments

Doesn't seem appropriate for a lib, considering PureComponent is a recent addition and I'm trying to maintain backwards compatibility. I could make that upgrade in the next major release- but it would be backwards-breaking.

Ah, that's totally understandable. Do you know if there's any public metrics that show each version's usage? Would it be safe to assume your plan is to follow along with react and drop v14 support when v16 is released?

Hm, no clue. I don't know if even the React team knows that, although I'll ask Ben when I see him.

Yes, that would be reasonable to assume. 馃槃

Closing for now 馃槃 We can revisit when next React version drops

@bvaughn Can we revisit this? Dropping shallow-compare would be nice because it frees up that pesky peer dependency.

We can revisit once React 16 lands _or_ with the next major react-virtualized released. 馃槃

Sounds good! Sorry, I suppose I should have prefaced that last message with "I have no idea what version React was at when you guys first had this conversation".

* subscribes to thread *

No problem 馃槃 This ticket was from November '16 and React 15 has been out since April '16, so same major version.

FYI thought you might like to know that the upcoming react-virtualized version 9 will drop support for shallowCompare in favor of using React.PureComponent.

Was this page helpful?
0 / 5 - 0 ratings