Skip to content

Instantly share code, notes, and snippets.

@danielschmitz
Last active March 5, 2020 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielschmitz/3298931710299d775f3be9c849832898 to your computer and use it in GitHub Desktop.
Save danielschmitz/3298931710299d775f3be9c849832898 to your computer and use it in GitHub Desktop.
React Template
import React, {useEffect, useState} from 'react';
export default function App() {
/**
* States
*/
const [_foo, setFoo] = useState([]);
/**
* Effects
*/
useEffect( () => {
setFoo("Foo")
}, [])
/**
* Handlers
*/
/**
* Internal Components
*/
const cHelloWorld = <h1>Hello World, {_foo}</h1>
/**
* Main Component
*/
return (
<>
{cHelloWorld}
</>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment