React 使用from.creted 报错 __WEBPACK_IMPORTED_MODULE_0_react___default.a.createRef is not a function
2020-07-23 14:51
731 查看
最近需要做这样一个页面就是点击按钮弹出模态框,在表单中写入数据的时候,表单。显示表单,但是在使用的时候就会出现 __WEBPACK_IMPORTED_MODULE_0_react___default.a.createRef is not a function
怎么回事?from.created()不能使用了?getFieldDecorator也不能使用了。。。这是什么情况?
看了看之前的项目,发现写的一模一样啊,只要导入了antd就可以使用啊。
唯一不一样的就是antd的版本了。现在的版本的antd@4.4.1,也没别的解决办法了,只能回退版本一个一个的试了。在回退到
“antd”: "^3.26.14"版本的时候,就不回报错了。
记住在修改了package.json以后需要 yarn install进行重新安装依赖。
如果解决了你的问题
点个赞吧。
————————————————
版权声明:本文为CSDN博主「蓝奕世」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_42584411/article/details/107509928
相关文章推荐
- ypeError: _api_banner__WEBPACK_IMPORTED_MODULE_0__.default.getIndexData is not a function“
- 解决 TypeError: antd_es_form__WEBPACK_IMPORTED_MODULE_7__.default.create(...) is not a function
- vue踩坑--TypeError: __WEBPACK_IMPORTED_MODULE_1_vuex__.a.store is not a constructor
- vuex报错__WEBPACK_IMPORTED_MODULE_1_vuex__.a.store is not a constructor
- 关于webpack与less-loader的版本匹配问题TypeError: this.getResolve is not a function at Object.loader
- webpack webpack-core LoadersList TypeError: r.forEach is not a function
- vue 中报错 __webpack_require__.i(…) is not a function
- eclipse中使用maven build启动web项目中报错. -Dmaven.multiModuleProjectDirectory system propery is not set Check
- 使用npm启动vue报错'webpack-dev-server' is not recognized as an internal or external command'
- 4000 运行vue报错__WEBPACK_IMPORTED_MODULE_2__router__.a is not a constructor
- 运行Vue报错 __WEBPACK_IMPORTED_MODULE_0_vue__.default.user
- Angularjs + Webpack 框架里,引入Bootstrap-datepicker插件时,datepicker is not a function错误的解决方法
- __webpack_require__(...) is not a function
- Uncaught (in promise) TypeError: __webpack_require__.i(...) is not a function
- 使用vue时Module build failed: TypeError: this._init is not a function错误的解决方法
- Uncaught TypeError: __webpack_require__.i(...) is not a function
- 【ReactJS 初体验】Module build failed: TypeError: fileSystem.statSync is not a function
- webstorm vuejs 警告“default export is not declared in imported module”
- webpack打包遇到locals[0] does not appear to be a `module` object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using `env` section in Babel configuration
- 关于The function equals must be used with a prefix when a default namespace is not specified解决