41 lines
735 B
Markdown
41 lines
735 B
Markdown
### ComponentName
|
|
|
|
Explain briefly what the snippet does.
|
|
|
|
Explain briefly how the snippet works.
|
|
|
|
```jsx
|
|
function ComponentName(props) {
|
|
return <div>{props}</div>;
|
|
};
|
|
```
|
|
<!-- OR -->
|
|
```jsx
|
|
class ComponentName extends React.Component {
|
|
constructor(props){}
|
|
render(){
|
|
return <div>{props}</div>;
|
|
}
|
|
}
|
|
```
|
|
|
|
```jsx
|
|
ReactDOM.render(<ComponentName />, mountNode);
|
|
```
|
|
|
|
<!-- OPTIONAL -->
|
|
#### Notes:
|
|
* Things to remember when using this
|
|
* Other options that might be less appealing or have lower compatibility
|
|
* Common mistakes and issues
|
|
|
|
<!-- tags: (separate each by a comma) -->
|
|
|
|
<!-- expertise: (0,1,2,3) -->
|
|
<!-- Expertise levels (pick only one, no parentheses):
|
|
0: beginner
|
|
1: intermediate
|
|
2: advanced
|
|
3: expert
|
|
-->
|