Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Should pure use the new PureComponent? #251

Closed
kevinSuttle opened this issue Sep 28, 2016 · 8 comments
Closed

Should pure use the new PureComponent? #251

kevinSuttle opened this issue Sep 28, 2016 · 8 comments

Comments

@kevinSuttle
Copy link

facebook/react#7730

@istarkov
Copy link
Contributor

As I understand It will lock recompose on specific React version.
For now I use it in a big project with old React 0.14.x and it works well.
BTW Im not sure about React version support politic.
Sometimes it will be easier to drop old versions support but it will be a problem
for me if sometimes is today :-)

@wuct
Copy link
Contributor

wuct commented Sep 28, 2016

PureComponent checks both props and state. In contrast, pure checks only props, so it might be quicker.

@dlebedynskyi
Copy link

I think pure should stay as it is. First due to what @wuct sad.
2nd - pure is HOC, while PureComponent is full Component that you most likely going to use as class My extends React.PureComponent. To me this a bit different scenario of usage.
Unless PureComponent has some dramatic advantages in usage it does not make sense for me to deprecate or rework pure

@istarkov
Copy link
Contributor

@dlebedynskyi pure HOC could be rewritten to use React.PureComponent and will have a really short source, so 2 is not so different ;-)

@dlebedynskyi
Copy link

dlebedynskyi commented Sep 28, 2016

@istarkov well yeah. But why does it has to be rewritten? it is not like is working wrong now.

@istarkov
Copy link
Contributor

For fun for example, a good reason as I know ;-)

@dlebedynskyi
Copy link

@istarkov it is your repo guys) go for it if you really think it is needed )

@wuct
Copy link
Contributor

wuct commented Feb 28, 2017

I am going to close this issue because it's no longer active. Please feel free to reopen it if you have further input.

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

No branches or pull requests

4 participants