export default class player extends React.Component {super(...args); shoot: 0} shoot是我试图在函数生成器中更改的变量,稍后将在<h1>中显示。this.state.shoot}</h1>
<button onClick={() => this.shooter}>shoot it
我有一个带有属性( property title )的React AppBar组件,它正在根据window.location.pathname返回的值进行更改。因此,随着页面/url的更改,标题将随之更改。,如果一个不同的组件(而不是AppBar)导致页面/url更改,则不会执行AppBar。例如,页面上的另一个单独的