-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actions.{route} not defined for nested scenes #2045
Comments
It depends when you try to call it. Maybe you are calling it before router creates actions
… 16 июля 2017 г., в 21:57, Pavel Shut ***@***.***> написал(а):
Triggering actions for the most nested screens produce such an error:
undefined is not a function ( evaluating '_reactNativeRouterFlux.Actions.kriyaView()')
import React, { Component } from 'react'
import { Router, Scene, Actions } from 'react-native-router-flux'
import { KriyaView } from '../KriyaView'
import { KriyaEdit } from '../KriyaEdit'
import { HomeTimer } from '../HomeTimer'
import { Kriyas } from '../Kriyas'
import { NavDrawer } from '../NavDrawer'
class Root extends Component {
render() {
return (
<Router>
<Scene key="root">
<Scene
drawer
contentComponent={NavDrawer}
key="navDrawer"
hideNavBar
drawerPosition="right"
>
<Scene
key="hometimer"
component={HomeTimer}
navTransparent
/>
<Scene
key="kriyas"
component={Kriyas}
title="Kriyas"
initial
>
<Scene
key="kriyaEdit"
component={KriyaEdit}
title="Edit Kriya"
/>
<Scene
key="kriyaView"
component={KriyaView}
backTitle="View Kriya"
/>
</Scene>
</Scene>
</Scene>
</Router>
)
}
}
export { Root }
I tried not wrapping all the screen in a drawer but still get this error.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I call it by tapping a button when everything is rendered long ago |
Strange. Could you try to reproduce it on Example project?
… 16 июля 2017 г., в 22:53, Pavel Shut ***@***.***> написал(а):
I call it by tapping a button when everything is rendered long ago
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Oh, parent scenes cannot have |
I'm not migrating from v3, just strted new project from 4.b11. Would be
cool to have docs for v4 where it's written what's allowed and what's not.
17.7.2017 12.25 пасля паўдня карыстальнік "Pavel Aksonov" <
notifications@github.com> напісаў:
Closed #2045
<#2045>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2045 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAtFljwNYBtpcb6oEvsln-yzAeaSNkTaks5sOyiVgaJpZM4OZZX4>
.
|
for v4 I didn't write anywhere that Scene could have both children and component. I will add check for it to throw exception for next version. |
Any drawbacks available? Running into the same issue after upgrade from v3.39 to v4.0.0. Something like:
will not work anymore when it comes to force a scene to appear like
Thanks for clarifing! |
Triggering actions for the most nested screens produce such an error:
I tried not wrapping all the screen in a drawer but still get this error.
Using "react-native-router-flux": "^4.0.0-beta.11"
Calling e.g. Actions.hometimer() works good though.
The text was updated successfully, but these errors were encountered: