Closed AbhimanyuAjudiya closed 8 months ago
Will
getRandomColors()
be called on the initial render? Have you tested this properly?
yes it will works properly, I have tested it properly.
Will
getRandomColors()
be called on the initial render? Have you tested this properly?yes it will works properly, I have tested it properly.
Can you explain how the function will be called initially if spacebar is not pressed?
initially useEffect() will called once due to second parameter '[]' and it will return a call back function where we have specified the getRandomColors()
and in useEffect() we use return to clean up any side effects that we might have created.
Thanks for your contribution. Please check out other issues as well. Happy coding..
Fixed #25