Skip to content
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

React Native #70

Closed
obromios opened this issue Jul 8, 2016 · 1 comment
Closed

React Native #70

obromios opened this issue Jul 8, 2016 · 1 comment

Comments

@obromios
Copy link

obromios commented Jul 8, 2016

I posted the following on stack overflow with no answer. Perhaps turbolink-ios can help?

I am building a hybrid react-native + ruby on rails app. I am using the ```onNavigationStateChange``` in the ```WebView``` component to detect changes in the page, and use this to change the react-native navigation menu.  This works fine, but when I tried to use ```turbolinks```, there can be a change in the page but the ```onNavigationStateChange``` is not triggered.

The  ```onNavigationStateChange``` is triggered is with following code

      render() { 
        return (
          <WebView
            ref={'webview'}
            automaticallyAdjustContentInsets={false}
            source={{uri: SETTINGS_URL}}
            javaScriptEnabled={true}
            onNavigationStateChange={this.props.onNavigationStateChange}
            startInLoadingState={true}
            scalesPageToFit={true}
          />
        )
      }

This works normally, but if I turn on turbolinks, in the ROR app, the ```onNavigationStateChange``` no longer triggers.

How do I fix this?
@obromios
Copy link
Author

obromios commented Jan 2, 2017

The good news, I have tried this with Turbolinks 5 and it works!

@obromios obromios closed this as completed Jan 2, 2017
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

No branches or pull requests

1 participant