question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Pure Component

See original GitHub issue

Hello,

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:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ttanimichicommented, Feb 20, 2018

PureClass? Do you mean PureComponent ?

0reactions
BookOfGregcommented, Mar 1, 2018

Been over a week, going to close it for now. Let me know if you need anything further.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found