Using Pure Component
See original GitHub issueHello,
I have been using react-rails gem from some of my project and it really worked out well.
Recently, I came across the concept of Pure components in reactjs. But when I try to make my component pure using the below statement, it does not work
var MyComponent = React.createPureClass
It says createPureClass not a function. What is the way to make pure components with this gem.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
What are React pure functional components? - LogRocket Blog
A React component is considered pure if it renders the same output for the same state and props. For this type of class...
Read more >What are Pure Components in React - Medium
React uses Pure Components to provide optimizations. Pure Components do not depend or modify the state of variables outside its scope.
Read more >ReactJS Pure Components - GeeksforGeeks
Extending React Class Components with Pure Components ensures the higher performance of the Component and ultimately makes your application ...
Read more >PureComponent - React Docs
PureComponent is similar to Component but it skips re-renders for same props and state. Class components are still supported by React, ...
Read more >What is React Pure Component? - Nathan Sebhastian
By default, React will always re-render the component each time there is a change in state or props value. A Pure Component is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
PureClass? Do you mean
PureComponent
?Been over a week, going to close it for now. Let me know if you need anything further.