Memory changes of React during Router switching

problem description: it has recently been found that abnormal memory growth occurs when pages are constantly switching.

for example, I have two routes, NewWallet and NewTransaction . As shown in the following figure, I first do Snapshot2 , then switch back and forth between the two routes, and then record Snapshot3 . By comparison, it is found that a lot of new memory has been opened during this period.

  1. Why does the component request memory multiple times? is it related to the untimely GC?
  2. FiberNode seems to be applied for by React-dom

Menu