Javascript '的参数数非法;更新hotspot';调用TouchableHighlight的焦点方法时出现命令错误

Javascript '的参数数非法;更新hotspot';调用TouchableHighlight的焦点方法时出现命令错误,javascript,reactjs,react-native,Javascript,Reactjs,React Native,我正在用React Native创建一个电视应用程序,并试图手动触发对可触摸高光的聚焦。我的代码是: class Button extends Component { constructor(props) { super(props); this.focus = this.focus.bind(this); this.buttonRef = React.createRef(); } focus() { this.buttonRef.current.f

我正在用React Native创建一个电视应用程序,并试图手动触发对可触摸高光的聚焦。我的代码是:

class Button extends Component {
  constructor(props) {
    super(props);
    this.focus = this.focus.bind(this);
    this.buttonRef = React.createRef();
  }

  focus() {
    this.buttonRef.current.focus();
  }

  render() {
    return (
        <TouchableHighlight ref={this.buttonRef} />
    );
  }
}
class按钮扩展组件{
建造师(道具){
超级(道具);
this.focus=this.focus.bind(this);
this.buttonRef=React.createRef();
}
焦点(){
this.buttonRef.current.focus();
}
render(){
返回(
);
}
}

无论何时调用focus methodd,我都会得到错误:
updateHotspot命令的参数数非法
。我该如何解决这个问题?

@khateb您解决了这个问题吗?