先看看为什么需要绑定this:
import React from 'react'
export default class BindThis extends React.Component {
constructor(props) {
super(props)
this.state = {
msg: '这是默认的MSG',
}
}
render
先看看为什么需要绑定this:
import React from 'react'
export default class BindThis extends React.Component {
constructor(props) {
super(props)
this.state = {
msg: '这是默认的MSG',
}
}
render