I am making an Algorithm sorting visualizer, my problem is that I am not able to figure out how I will change the background colour of each Bar
while iterating in for
loop and while adding console logs
or set statement of useState
the for
loop slows down, is there is any way to fix it
And yeah I tried to set the FirstIndexToCompare
and SecondIndexToCompare
in the loop but didn't work, while console logging it shows null
Git Repo: https://github.com/the-wrong-guy/Sorting-Algorithm-Visualizer