Testing latest React API: React Hook
Testing out React (v16.8.0-alpha) Latest API
React Hooks
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.
Using 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.
Read more about React useState()
What makes hook really awesome is useEffect() function, because it replace 3 lifecycle hooks of react class component (componentDidMount, componentWillUnmount() & componentDidUpdate)
Read more about React useEffect()
Ultimately, with React Hooks, you are able to write even less codes and in a more functional approach.
Live version
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)
Leave Testing latest React API: React Hook to:
Read more #react posts
Best Posts From Johnson Lai
We have not curated any of superoo7's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Johnson Lai
- WHive Smart Contract Analysis
- Created Hive-Price-Feed
- Created Hive-Price-Feed
- Joining Steemfest 4 community
- [Tutorial] Ruby On Rails Push Notification
- Use "Do Not Track" on your web browser
- Build A Full Front End Stack with Quasar Framework and Vue
- Done my personal portfolio with Steem Blockchain and Quasar Framework
- Unexpected down time
- Side to side comparison of Digital Ocean and AWS LightSail
- What Front End Technology to use to create Steem Dapps?
- Trying out decentraland SDK v5
- Quick simple guide on making Redux-Observable works with TypeScript
- Testing latest React API: React Hook
- DRY your code with Vue.js
- A year on steem!
- Release of Vue CLI plugin generate Vue Project for Chrome Extension
- Advent of Code 2018 is available in 2 days
- Tailwind CSS - Utility-First CSS Framework
- Emoji Builder - ๐ Build your favourite combination of emoji ๐