MUI/Icon makes everything dissapear

When I try to import and use a mui icon in react, it makes the whole div dissapear, and just the background image remain, i have installed: emotion/react, emotion/styled, mui/icons-material, mui/material, styled-components, mui/styled-engine-sc

        <div className="login">
        <div className="form">
            <EmailIcon className='icon'/>
            <input type="text" placeholder="Email"></input>
            <input type="password" placeholder='Password'></input>
        <div className="buttons">
            <button id='login'>Login</button>
            <button id='register'>Register</button>

1 answer

  • answered 2022-05-06 20:47 gavin

    I copied your code, installed the dependencies and it worked just fine for me. I suggest updating these dependencies:

    npm update @mui/material @mui/icons-material @emotion/styled @emotion/react

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum