Files
30-seconds-of-code/snippet-template.md
2018-11-29 10:08:54 +02:00

735 B

ComponentName

Explain briefly what the snippet does.

Explain briefly how the snippet works.

function ComponentName(props) {
  return <div>{props}</div>;
};
class ComponentName extends React.Component {
  constructor(props){}
  render(){
    return <div>{props}</div>;
  }
}
ReactDOM.render(<ComponentName />, mountNode);

Notes:

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