manancodes / Screenbows

Magical colours for your screen
https://manancodes.github.io/Screenbows/
11 stars 9 forks source link

Added, change colour when spacebar is pressed feature. #26

Closed AbhimanyuAjudiya closed 8 months ago

AbhimanyuAjudiya commented 8 months ago

Fixed #25

AbhimanyuAjudiya commented 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.

manancodes commented 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.

Can you explain how the function will be called initially if spacebar is not pressed?

AbhimanyuAjudiya commented 8 months ago

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.

manancodes commented 8 months ago

Thanks for your contribution. Please check out other issues as well. Happy coding..