aksonov / aksonov/react-native-router-flux

When bind the "this" in Nav's title, the App crash

未关闭
#2,571 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
8.9k
派生
2.1k
PR 合并指标
30 天内没有已合并 PR

描述

### Version
Tell us which versions you are using:

- react-native-router-flux v4.0.0-beta.22 (v3 is not supported)
- react-native v0.49.3

### Expected behaviour
click the Nav's title, show the modal

### Actual behaviour
the app crash.

![image](https://user-images.githubusercontent.com/11731681/32268485-3ebda454-bebd-11e7-80e4-11bd6d344519.png)

### Steps to reproduce
For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.

**if modify the \'s onPress function to "onPress={this.showAppSelect} ", the app just have error.**

class DashBoard extends React.Component {
showAppSelect(){
this.setState({modal:true})
}
navTitleRender = (title) => {
Actions.refresh({
renderTitle: (
\
\
\{title}\
\
\
)
})
}
constructor(props) {
super(props);
this.state = {
modal:: false,
};
}

componentWillMount() {
this.navTitleRender(appName);

......

render() {
return (
\
\this.setState({modal:false,})}
\>
\
\
.....

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。