给NavigatorBar设置右侧按钮无法显示,有警告
来源:9-1 带搜索的NavBar实现-1

Leonard_
2018-08-22
rightButton of type function supplied to NavigationBar,expected a single ReactElement
写回答
1回答
-
this.renderRightButton是个function,this.renderRightButton()返回的才是个React元素:
将rightButton={this.renderRightButton} 改为:rightButton={this.renderRightButton()}即可
012018-08-23
相似问题