useState()
useState() is to hanlde react of data. Any data that changes in the application is called a state. And whenver a state changes, you want react to update the UI, so the latest change is reflected to the end user.
It takes one optional argument as the default state.
useEffect()
Component lifecycle: DidMount -> DidUpdate -> Will Unmount
useEffect() runs every time a stateful data changes on a component (i.e. run when mounted, and run when state updates. )