question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After upgrading to v5.5.5, the Menu in AppHeader causes React to redraw frequently

See original GitHub issue

What package has an issue

@mantine/core

Describe the bug

After upgrade to v5.5.5, all the pages had 100% CPU usage, and the problem disappeared after the downgrade to v5.5.4

image

It seems to be caused by MenuItem and Box, in the last version these functions were no more than 10ms

image image 截屏2022-10-13 01 28 39

What version of @mantine/hooks page do you have in package.json?

^5.5.5

If possible, please include a link to a codesandbox with the reproduced problem

Do you know how to fix the issue

No response

Are you willing to participate in fixing this issue and create a pull request with the fix

No response

Possible fix

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
rtivitalcommented, Oct 18, 2022

The changes were reverted, should be fixed on 5.5.6

1reaction
atumas-bananamilkcommented, Oct 15, 2022

I face this issue when I add onChange to my Menu. Seems like the state becomes delayed by 1 step. My version is way back but I still get the same issue as reported: "@mantine/core": "^5.1.5"

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I prevent re-render after state changed in React ...
When I set showMenu to true by button, a menu appears but the problem is all my components (Header,MainArea,Footer) do re-render. I don't...
Read more >
When does React re-render components? - Felix Gerschau
There are two common reasons why React might not update a component even though its props have changed: The props weren't updated correctly...
Read more >
Getting started with React - Learn web development | MDN
This brings us to the end of our initial look at React, including how to install it locally, creating a starter app, and...
Read more >
KendoReact Changelog - Telerik
Bug Fixes. grid: drag & drop issues in react 18 and strict mode; inputs: ColorGradient inputs throw error when the value is changed ......
Read more >
Optimizing React performance by preventing unnecessary re ...
This article explains how to update components only when necessary, and how to avoid common causes of unintentional re-renders.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found