560 B
560 B
title, tags, expertise, firstSeen
| title | tags | expertise | firstSeen |
|---|---|---|---|
| Component Name | components,state,effect | intermediate | 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.
const ComponentName = props => {
const [state, setState] = React.useState(null);
React.useEffect(() => {
setState(0);
});
return <div>{props}</div>;
}
ReactDOM.render(<ComponentName />, document.getElementById('root'));