我有这个简单的代码来显示文本字段:
我收到错误
/turbo_modules/react@16.13.0/cjs/react.development.js中的错误(1465:13) 无效的挂接调用。
代码位于此链接https://stackblitz.com/edit/react-6dgvfj?file=UserForm.js
import React, { Component } from 'react';
import compose from 'recompose/compose';
import { connect } from 'react-redux';
import TextField from '@material-ui/core/TextField';
const UserForm = props => {
return (
<div>
This is userform component.
<TextField id="standard-basic" label="Standard" />
</div>
);
}
export default UserForm;
答案 0 :(得分:0)
react 和 react-dom 软件包始终成对发布。因此,它们一定是同一版本,可以一起工作。在您的情况下,react为16.12.0,react-dom为16.13.0
您的package.json
"dependencies": {
"@material-ui/core": "^4.9.5",
"@types/react": "^16.8.6",
"react": "^16.13.0",
"react-dom": "16.12.0"
},
将其更改为
"react": "16.13.0",
"react-dom": "16.13.0"