"redux": "^4.0.0", node : v10.2.1
.babelrc
{
"presets": ["env", "react"],
"plugins": [
"babel-plugin-transform-runtime",
"transform-object-rest-spread",
["import", { "libraryName": "antd-mobile", "style": "css"}]
]
}
script:
import { Button } from "antd-mobile";
...
<Button type="primary">primary</Button>
...
then it comes :
invariant.js:42 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Check the render method of `Button`.
how can I fix it ?