0 votes
in ReactJS by
What are the problems of using render props with pure components in ReactJs?

1 Answer

0 votes
by

If you create a function inside a render method, it negates the purpose of pure component. Because the shallow prop comparison will always return false for new props, and each render in this case will generate a new value for the render prop. You can solve this issue by defining the render function as instance method.

...