Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29429

How do I handle backAndroidHandler in each scene using react-native-router-flux

$
0
0

As the title description, I'm using react-native-router-flux.

And there is a question, I used backAndroidHandler={true} in <Router/> work normally before.

But now, because some reason I have to set backAndroidHandler to control physical back button enable in different scene.

So I can't just put it in router something like this before:

Example:

<Router    backAndroidHandler={true}><Scene key="a" /><Scene key="b" /><Scene key="c" /></Router>

How could I setting backAndroidHandler in different scene or in the Tag to achieve this without setState (Because it will rerender again at route page)?

I have tried someone said in other question using like <Scene key="c" type={ActionConst.RESET}/> didn't work.

Any help or recommend will be appreciate. Thanks.


Viewing all articles
Browse latest Browse all 29429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>