Skip to content
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

add a "always pure" config for react components #16624

Closed
mh-alahdadian opened this issue Aug 30, 2019 · 1 comment
Closed

add a "always pure" config for react components #16624

mh-alahdadian opened this issue Aug 30, 2019 · 1 comment

Comments

@mh-alahdadian
Copy link

Do you want to request a feature or report a bug?
request a feature

What is the current behavior?
as default all the components are behave as impure-component

What is the expected behavior?
I want react to give a config and then I can tell it I'm always write my components as pure components and then I didn't need React.memo before all my components and as you know React.memo will only handle props not state (hooks).

I don't know why default behavior is impure component I had never use them it's so ugly in my mind

@mh-alahdadian mh-alahdadian changed the title add a always pure config for react add a "always pure" config for react components Aug 30, 2019
@bvaughn
Copy link
Contributor

bvaughn commented Aug 30, 2019

Hi 👋 What you're describing would be a large change. This sort of thing is better requested as an RFC:
https://github.com/reactjs/rfcs/

Here is a related RFC:
reactjs/rfcs#108

And here is a related comment from Sebastian that you might be interested in:
reactjs/rfcs#108 (comment)

I'm going to close this issue since this sort of thing belongs in the RFC repo 😄

@bvaughn bvaughn closed this as completed Aug 30, 2019
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

No branches or pull requests

2 participants