Skip to content

Instantly share code, notes, and snippets.

@wintorez

wintorez/memoize_react.jsx

Last active Jun 20, 2018
Embed
What would you like to do?
import React from 'react';
import memoize from 'lodash/memoize';
const Heading = memoize((props) => (
<div className="heading">
<div className="App-header">
<h2>{props.title}</h2>
</div>
</div>
), (props) => {
return props.title;
});
export default Heading;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment