-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Actions.pop() seems to no longer send the user back to the last scene, instead it a) selects the scene which is defined before the currently selected and b) deletes the last scene in the list. When the first element is reached, the app crashes with "undefined is not an object (evaluating 'selected.hasOwnProperty')"
My main component:
export default class ExampleApp extends Component {
render() {
var sceneDefaults={
hideNavBar: true
};
return (
<Router>
<Scene key="tabbar" initial={true} tabs={true} default="home" style={style.tabBar} >
<Scene
{...sceneDefaults}
key="chat"
title="Chat"
icon={TabBarIcon}
component={ChatScreen}
inactiveImage={require('../image/chat.png')}
activeImage={require('../image/active_chat.png')}
/>
<Scene
{...sceneDefaults}
key="favorites"
title="Favoriten"
icon={TabBarIcon}
component={FavoriteScreen}
inactiveImage={require('../image/hotel.png')}
activeImage={require('../image/active_hotel.png')}
/>
<Scene
{...sceneDefaults}
key="home"
title="Home"
initial={true}
icon={TabBarIcon}
component={HomeScreen}
inactiveImage={require('../image/home.png')}
activeImage={require('../image/active_home.png')}
/>
<Scene
{...sceneDefaults}
key="feedback"
title="Feedback"
inactiveImage={require('../image/book.png')}
activeImage={require('../image/active_book.png')}
icon={TabBarIcon}
component={FeedbackScreen}
/>
<Scene
{...sceneDefaults}
key="info"
title="Info"
icon={TabBarIcon}
component={InfoScreen}
inactiveImage={require('../image/info.png')}
activeImage={require('../image/active_info.png')}
/>
</Scene>
</Router>
);
}
}
If "Home" selected, calling Actions.pop() causes the selection to pass to "Favorites", "Info" disappears. Next call moves the selection to "Chat", and removes "Feedback". The third call then causes the aforementioned javascript error.
Metadata
Metadata
Assignees
Labels
No labels