The aim of this exercise is to practice and understand the concept of state
.
For now, we will be only looking forward, as how state's
work, with class-component
in react.
With respect to how state's
work with functional-component
-> we will go through that in upcoming lessons. But, just to give a headstart, hooks
are used, in order to maintain state's
using functional-component
in react.
We will see hooks
in detail in upcoming lessons.
-
Clone this repository.
-
On your terminal go inside
exercise-lab-state-boilerplate
directory and use the following command:npm install
.This command install's all the packages to your system that this project is using. Here is a link to get a better understanding of what and how exactly the above command works.
- Once everything is ready, you can type
npm run dev
-> inorder to run the application. You should be able to see a server running and see the output as shown below:
Your task is to display the current local time - as shown below.