|
|
|
|
|
by acemarke
450 days ago
|
|
You can see exactly what the React compiler output is by pasting the listed code into the compiler playground: - https://playground.react.dev/#N4Igzg9grgTgxgUxALhAMygOzgFwJY... In this case, it looks like the compiler has hoisted the console logs from the `useMemo` calls out into the main body of the function component, because it considers those to be side effects. So, the logs are still occurring. However, the actual child component output _is_ being memoized as expected. |
|