You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why are the arrow colors being changed at every render?
That is because of a re-render. Arrow colours are randomized. The re-renders were because there are a lot of state variables and setting even one of them re-renders all components.
I had not thought about Memoization and other methods to prevent re-renders till date, but I came across a PR on React.memo()'s RFC today by chance and that prompted me looking up some stuff (linked below) and using React.memo() in conjunction with useCallback() to Memoize the GraphArea component.
Why are the arrow colors being changed at every render?
git-graph-q.mp4
The website gets very junky and gives a lag for huge
.git
folders when it is processing this for every click/render.The text was updated successfully, but these errors were encountered: