Hi! Today we will learn how to use react hooks in a simple way in order to get strong basic fundamental in react hooks.
The first thing we need to set up is of course react JS environment which you can refer to their documentation. If all is ready, then we are good to go!
Lets open up project file then open App.js file, there you can start by importing react and hooks useState so we can use it later. Here is how it looks.
Next is creating function called App, here we using functional component so it is aligned…
In this post, we will learn how to fetch data from 3rd party API and show the result on the HTML page. This time, the data we will fetch is an image from Dog API which is very incredible. Without any further ado, let's get started!
Define the HTML. All we need is a button and img tag to place the result later. Here is how it’s done.
There we declare a variable called counter, then we assigned value 0 to it. Then we create setInterval method to repetitively increment the counter value, and it will increase every 1000ms or every 1…
Final year IT student with high interest in website development.