2016-10-01 3 views
0

나는 네이티브를 React Native Tutorial로 실험했으며 작동 중입니다!React 네이티브 - "Navigation Experimental"을 사용하여 콘텐츠로드

(목적에) 내 문제는 : 나는 다음 장면의 "내용"(만 네비게이터 변경)

if (this.state.navigationState.index == 0) { 
    const route = {key: 'secondepage', component:MyScene}; 
    console.log("après modification "+route.component.defaultProps.title); 

    // Use the push reducer provided by NavigationStateUtils 
    navigationState = NavigationStateUtils.push(navigationState, route); 
} 

문제는 내가를로드 할 수 있습니다를로드 할 수 없습니다 구성 요소 "내 장면"... 구성 요소 Myscene (route.component.defaultProps.title)의 소품을 얻을 수 있지만 텍스트가로드되지 않습니다. NavigationStateUtils.push(..,..)은 (는) 작동합니까?

NB : 전체 코드가 필요한 경우 붙여 넣을 수 있습니다. 답변

답변

0

주셔서 감사합니다 I ")는 스위치 (this.props.index를"그것은

(나는 추가 ... 그냥 내 기능 RendersScene을 변경하지 않았다면, 일하고 ... 해결책을 발견 : 그래서 인덱스 값 (~ 내 페이지 번호)을 사용하여 렌더링을 변경할 수 있습니다.