Vanex + ReactNavigation android下的问题
- Dominant language
- JavaScript
- Stars
- 68
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
首先说明下在iOS中是OK的,如下图

在android下,如下图错误

>然后在android下开启debugger模式,出现白屏,chrome里出现奇怪的问题,如下图


代码很简单如下
package.json
```
"dependencies": {
"react": "16.0.0",
"react-native": "0.50.3",
"react-navigation": "^1.0.0-beta.21",
"vanex": "^1.0.11"
}
```
ios和android使用同一入口文件 App.js
```
class App extends Component {
constructor(props) {
super(props);
// 这里做相关初始化工作
}
render() {
return ;
}
}
export default start({
component: App,
models: models
});
```
models.js
```
import home from './home';
import user from './user';
import chat from './chat';
export default {
home,
user,
chat
};
```
models中的这三个内容一样,也很简单,home.js,user.js,chat.js
```
export default {
name: 'home', // user.js中是 user, chat.js 中此处是chat
data: {},
computed: {},
syncs: {},
effects: {},
autorun: {}
};
```
AppNavigator.js
```
const AppNavigator = new StackNavigator(
{
Home: { screen: Home },
Chat: { screen: Chat }
},
{}
);
export default AppNavigator;
```
最后提供下源码工程
[VanexReactNavigation.zip](https://github.com/alibaba/vanex/files/1497872/VanexReactNavigation.zip)
> 由于文件大小限制,RN工程下的 android 和 ios 目录已删除。
求解答,我现在的工程和这个demo结构一样,遇到这样的问题。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Android behavior with the provided VanexReactNavigation.zip project and the package versions listed in package.json. Read App.js, models.js, the three model files, and AppNavigator.js, then compare Android with iOS and debugger mode. Done means the Android navigation works without the reported error or white screen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100