Files
30-seconds-of-code/snippet-template.md
2019-09-11 09:13:29 +03:00

506 B

title, tags
title tags
ComponentName visual,state,effect,intermediate

Explain briefly what the snippet does.

  • Explain briefly how the snippet works.
  • Use bullet points for your snippet's explanation.
  • Try to explain everything briefly but clearly.
function ComponentName(props) {
  const [state, setState] = React.useState(null);
  React.useEffect(() => {
    setState(0);
  });
  return <div>{props}</div>;
}
ReactDOM.render(<ComponentName />, document.getElementById('root'));