-
Notifications
You must be signed in to change notification settings - Fork 56
Added getCurrentRoutes functionality without the need of ref. #157
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
Added getCurrentRoutes functionality without the need of ref. #157
Conversation
@AsafBrieferyDev, thanks for your PR! By analyzing the annotation information on this pull request, we identified @SEthX, @charpeni and @AnNOtis to be potential reviewers |
+1 |
Looks good, can you fix eslint errors? |
Hi, Regards, On 7 Sep 2016, at 13:12, Nicolas Charpentier <[email protected]mailto:[email protected]> wrote: Looks good, can you fix eslint errors? — |
@@ -285,6 +287,10 @@ class Router extends React.Component { | |||
this.setState({ titleProps: props }); | |||
}; | |||
|
|||
const getCurrentRoutes = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected block statement surrounding arrow body. (arrow-body-style)
@@ -285,6 +287,10 @@ class Router extends React.Component { | |||
this.setState({ titleProps: props }); | |||
}; | |||
|
|||
const getCurrentRoutes = () => { | |||
return this.refs.navigator.getCurrentRoutes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon. (semi)
@@ -234,7 +234,9 @@ class Router extends React.Component { | |||
setTitleProps(props) { | |||
this.setState({ titleProps: props }); | |||
} | |||
|
|||
getCurrentRoutes() { | |||
return this.refs.navigator.getCurrentRoutes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon. (semi)
Congratulations ! :) I commented the errors in review. |
Is it possible that the getCurrentRoutes() function isn't available? When logging this.props I don't see the function |
Make sure you are using the version on github and not version 0.11.1. This update was not released yet to npm.
|
Added getCurrentRoutes functionality without the need of ref.
Since some projects cannot add ref to the router they cannot access this.refs.navigator.getCurrentRoutes(), hence, they cannot execute getCurrentRoutes.