Skip to content

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

Conversation

AsafBrieferyDev
Copy link
Contributor

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.

@mention-bot
Copy link

@AsafBrieferyDev, thanks for your PR! By analyzing the annotation information on this pull request, we identified @SEthX, @charpeni and @AnNOtis to be potential reviewers

@rdeift
Copy link

rdeift commented Sep 3, 2016

+1

@charpeni
Copy link
Contributor

charpeni commented Sep 7, 2016

Looks good, can you fix eslint errors?

@AsafBrieferyDev
Copy link
Contributor Author

AsafBrieferyDev commented Sep 19, 2016

Hi,
Sorry for the late response, my wife gave birth :)
As for that, I’m not sure how to do that…

Regards,
Asaf Samuel

On 7 Sep 2016, at 13:12, Nicolas Charpentier <[email protected]mailto:[email protected]> wrote:

Looks good, can you fix eslint errors?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//pull/157#issuecomment-245236420, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AS9TO_HpGSri-TKi13FfZlsPbsTYPTUuks5qno4YgaJpZM4J0Ihj.

@@ -285,6 +287,10 @@ class Router extends React.Component {
this.setState({ titleProps: props });
};

const getCurrentRoutes = () => {
Copy link
Contributor

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()
Copy link
Contributor

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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon. (semi)

@charpeni
Copy link
Contributor

Congratulations ! :)

I commented the errors in review.

@charpeni charpeni merged commit 7dfd543 into react-native-simple-router-community:master Sep 30, 2016
@AsafBrieferyDev AsafBrieferyDev deleted the add_getCurrentRoutes branch September 30, 2016 18:39
@GCour
Copy link

GCour commented Oct 7, 2016

Is it possible that the getCurrentRoutes() function isn't available? When logging this.props I don't see the function

@AsafBrieferyDev
Copy link
Contributor Author

Make sure you are using the version on github and not version 0.11.1. This update was not released yet to npm.
Use :

   npm install https://github.com/react-native-simple-router-community/react-native-simple-router

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants