📅  最后修改于: 2022-03-11 15:04:09.704000             🧑  作者: Mango
import React, {Component} from 'react';
import './App.css';
import IconBar from './components/icon-bar';
import Events from './components/events';
class App() extends Component {
constructor(props) {
super(props)
this.state = {
mode: null
}
this.updateMode = this.updateMode.bind(this);
}
updateMode = (newMode) => {
this.setState({mode: newMode});
}
return (
ENAKS
{this.state.mode}
);
}
export default App;
Add this to your knowledge