component is just an independent, re-useable piece of code.
import { useEffect, useState } from "react"
Here we are using the `import` statement to import `hooks` from the `React` library.
useState() :
This function is built into React, to store the state in a component.
The function returns an array.
The array contains the initial state value at index 0 and a function that modifies the state at index 1.
`const [ state, setState ] = useState([])`
useEffect() :
This function is built into React, to ***observe*** state.
It allows you to observe state and run some instructions when state changes.
Since the `useState` function performs the first change in state, you can observe that.
`useEffect(
() => {console.log(state) // View the initial state of tickets},
[] // When this array is empty, you are observing initial component state
)`