TypeError: react__WEBPACK_IMPORTED_MODULE_0___default. is not a function

时间:2025-01-18 15:15:10

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、解决办法