Update templates

This commit is contained in:
Angelos Chalaris
2023-05-19 23:16:36 +03:00
parent 4ba7359ea4
commit 91c7d29bb6
11 changed files with 173 additions and 3 deletions

View File

@ -0,0 +1,30 @@
---
title: Component Name
type: snippet
language: react
tags: [hooks]
cover: image
dateModified: 2021-06-13T05:00:00-04:00
---
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.
```jsx
const ComponentName = props => {
const [state, setState] = React.useState(null);
React.useEffect(() => {
setState(0);
});
return <div>{props}</div>;
}
```
```jsx
ReactDOM.createRoot(document.getElementById('root')).render(
<ComponentName />
);
```