Skip to content

Tab componentDidUpdate forces reflow #11673

@toddtarsi

Description

@toddtarsi

Hi, great repo and nice rollout of 1.x! I'm liking this repo a lot, but I have a slight issue with the Tabs implementation, in that it forces a DOM thrash on the componentDidUpdate call.

https://github.com/mui-org/material-ui/blob/303199d39b42a321d28347d8440d69166f872f27/packages/material-ui/src/Tab/Tab.js#L100

This getBoundingClientRects call is really hitting me pretty hard on Android. Is there anyway I could modify this component, and add a property like 'ignoreChanges', to just not call this on componentDidUpdate at all? Performance is that important to me at this point. I could also PR this, if that would help. I enjoy the chance to help out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions