Testing out React (v16.8.0-alpha) Latest API
Take note that React Hooks are still in Alpha.
React Hooks are available for functional component which are a "replacement" for react state in class component.
useState() you can create an array, where the first item in the array is the state, and the second item is a function to set the state.
What makes hook really awesome is
useEffect() function, because it replace 3 lifecycle hooks of react class component (
Ultimately, with React Hooks, you are able to write even less codes and in a more functional approach.
Live version of the site is at https://superoo7.github.io/react-16.8.0-alpha/
The source code is on GitHub, which includes another few latest API (React.Suspense, Context API and Hooks)