Files
30-seconds-of-code/snippet-template.md
Angelos Chalaris 3868acab34 Ran linter
2019-03-02 10:10:14 +02:00

716 B

ComponentName

Explain briefly what the snippet does.

Explain briefly how the snippet works.

function ComponentName(props) {
  const [state, setState] = React.useState(null);
  React.useEffect(() => {
    setState(0);
  });
  return <div>{props}</div>;
}
ReactDOM.render(<ComponentName />, document.getElementById('root'));

Notes:

  • Things to remember when using this
  • Other options that might be less appealing or have lower compatibility
  • Common mistakes and issues