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.

Lots of empty data-meta="MuiBox" style tags generated

See original GitHub issue
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

I was trying to render about 78 items, then I realized its render time was taking too much. Just was looking what was the reason and realized that lots of empty MuiBox style tags are generated when using Box component. Which was causing performance issue.

image

Expected Behavior 🤔

Using Box component shouldn’t generate empty style tags.

Context 🔦

Rendering 78 items which are using Box component inside create more than 1200 empty style tags which causing render it around 600ms

Your Environment 🌎

`npx @material-ui/envinfo`
  Chrome
  System:
    OS: macOS 11.0
  Binaries:
    Node: 12.18.1 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
  Browsers:
    Chrome: 83.0.4103.116
    Edge: Not Found
    Firefox: Not Found
    Safari: 14.0.1
  npmPackages:
    @emotion/styled:  10.0.27 
    @material-ui/core: ^4.11.1 => 4.11.2 
    @material-ui/icons: ^4.9.1 => 4.11.2 
    @material-ui/lab: ^4.0.0-alpha.57 => 4.0.0-alpha.57 
    @material-ui/styles:  4.11.2 
    @material-ui/system:  4.11.2 
    @material-ui/types:  5.1.0 
    @material-ui/utils:  4.11.2 
    @types/react: ^16.14.1 => 16.14.2 
    react: ^17.0.1 => 17.0.1 
    react-dom: ^17.0.1 => 17.0.1 
    typescript: ^4.0.5 => 4.1.3 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
eps1loncommented, Jan 13, 2021

Duplicate of https://github.com/mui-org/material-ui/issues/21893.

This is fixed in v5. We will not backport this fix to v4.

1reaction
oliviertassinaricommented, Jan 14, 2021

@jamilalisgandarov You can replace the imports of the Box from the core package and create your own following our guide with emotion: https://material-ui.com/system/basics/#emotion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lots of empty data-meta="MuiBox" style tags generated #24400
Just was looking what was the reason and realized that lots of empty MuiBox style tags are generated when using Box component.
Read more >
Svelte transitions create empty style tags in the markup
On the top level I setInterval() that gets all the empty styles in <head> and removes them. I'm unsure if the synchronous nature...
Read more >
Allowing XHTML-style empty tags in custom visualizations
In Looker 21.20, a new legacy feature, Allow XHTML-style Empty Tags in Custom Visualizations, is included in the Legacy Features page in ...
Read more >
showing lots of style tags in footer in block theme
These style blocks are automatically generated by Gutenberg as part of rendering Group blocks. Their presence is normal and does not indicate ...
Read more >
Things to know about styled-components | No Code, No Bug
Styled-components generates dynamic classNames to identify elements and to style them. · In development mode, it injects a <style> tag in the ...
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