Thanks to whoever can help me. I know it\'s a common thing to have the issue of useEffect re rendering. However in my case I have set it to render only once with the [] brackets