I have a problem with react component,then,Uncaught TypeError: Class extends value undefined is not a constructor or null.I try to delet the 'extends React.Component',but It`s fale..thanks for your help.
import React from 'react';
import ReactDOM from 'react-dom/client';
class Boss extends React.Component() {
handlClick() {
return alert('我是主页');
}
render() {
return (
<div class="goto">
</div>
);
}
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<Boss />);```