bardia riahi
bardia riahi

Reputation: 73

i have problem with material ui select in nextjs

I'm using material UI select with next js and on the page, I have some errors i can't fix that enter image description here

this section code

import Select from "@material-ui/core/Select";
import MenuItem from "@material-ui/core/MenuItem";

<Select defaultValue="1"  variant="standard" value={sampleref.current} ref={sampleref} onChange={handleChange}>
            <MenuItem value="1" className="1" >1</MenuItem>
            <MenuItem value="2" className="2">2</MenuItem>
        </Select>

Upvotes: 1

Views: 544

Answers (1)

Moein Moeinnia
Moein Moeinnia

Reputation: 2341

Disable Strict mode in next.config.js :

const nextConfig = {
  reactStrictMode: false, // React Strict Mode is off
}

module.exports = nextConfig

Upvotes: 1

Related Questions