代码:
class Component extends React.Component {
static contextTypes = {
router:PropTypes.object.isRequired
};
handleSubmit (e) {
...
fetch('xxx', {
...
})
.then(...)
.then((res) => {
if (...) {
this.context.router.push('xxx');
return;
...
报错:
不太明白这个报错_this2是什么意思
慕姐8265434
相关分类