跳转的主要方法:
1.component 中添加这行代码
navigator.push({name:'In'})}>注册
navigator.push({name:'Forget'})}>忘记密码
onPress 主要运用于点击事件中。
2.在运行的主页面中只能运行如下的component
const thunkMiddleWare = (store) => (next) => (action) => {
if (typeof action === 'function') {
return action(store.dispatch, store.getState)
}
return next(action)
export default function () {
return (
)
}
需要注意的是:a. middleware 是中间件的设置,它有固定的格式.
不能包含这个标签 但反过来可以。
3.点击跳转的页面的设置代码
function InComponent({navigator}){
return (
navigator.pop()} >注册
)
}
function ForgetComponent({navigator}){
return (
navigator.pop()} >忘记密码
)
}
export