1、错误描述
2、错误原因
import React, {Component} from 'react';
import {render} from 'react-dom';
import Button from 'react-bootstrap/Button';
var TickTock = ({
mixins: [SetIntervalMixin],
getInitialState: function() {
return {seconds: 0};
},
componentDidMount: function() {
(, 2000);
},
tick: function() {
({seconds: + 1});
},
render: function() {
return (
<label>
{} seconds.
</label>
);
}
});
由错误提示可知,是不是一个函数(方法)
3、解决办法