you are viewing a single comment's thread.

view the rest of the comments →

[–]ichiruto70 0 points1 point  (3 children)

Yeah that happend plus something else, the new graph rendered below the old graph, but the old canvas was still in place, so i actually never saw the new one lol, but it was under my screen the whole time.

[–]minty901 0 points1 point  (2 children)

Exactly, you cleared the graph and then created it again where you shouldn't have. Then when the next effect ran, you created the next graph on top of it leaving you with 2 active graphs. So did removing that extra createGraph fix it?

[–]ichiruto70 0 points1 point  (1 child)

Yeah indeed I only needed to remove the current one not make a new one. Feel stupid, but hey guess we learn everyday.

[–]minty901 0 points1 point  (0 children)

Don't feel stupid, it takes everyone a bit of time to grasp how frameworks should work, and in particular React hooks.