Using string literals in ref attributes is deprecated

eslint报错问题

 this.setState({ msgCode: text })}
              ref="MsgCode"
            />

正确格式为下面 用到refs属性时,比如:直接this.MsgCode.blur()

    this.setState({ msgCode: text })}
              ref={(c) => { this.MsgCode = c; }}
            />

你可能感兴趣的:(Using string literals in ref attributes is deprecated)