I am getting this React error when running in dev mode with Snowpack
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
This import is where the error is comming from.
import { Button } from "antd"
This is the dependencies you need to know about.
"dependencies": {
"antd": "^4.5.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
},
"devDependencies": {
"@snowpack/app-scripts-react": "^1.8.3",
"snowpack": "^2.7.6"
}
Do you have any idea how I can fix this?
I have tried so far these imports without luck.
import { Button } from "antd/lib/button"
and
import Button from "antd/lib/button"