Skip to content

Instantly share code, notes, and snippets.

@3nvi
Last active November 29, 2019 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3nvi/a47c22872d85d584662e1dbed09dab34 to your computer and use it in GitHub Desktop.
Save 3nvi/a47c22872d85d584662e1dbed09dab34 to your computer and use it in GitHub Desktop.
import React from 'react';
const NormalDiv = props => <div {...props} />
const App = () => {
const [randomValue, setRandomValue] = React.useState(0);
return (
<React.Fragment>
{new Array(50).fill(null).map((__, i) => (
<NormalDiv key={i}>Hello World</NormalDiv>
))}
<button onClick={() => setRandomValue(Math.random())}>Force Rerender</button>
</React.Fragment>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment