I need to have 2 different functions that update 2 different components only once in the beginning. Hence, I\'m using useEffect. The code is as follows
useEffect