question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Router doesn't get rendered on screen - Android

See original GitHub issue

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta27
  • react-native v0.50.0

Expected behaviour

Router initial screen shows up on screen.

Actual behaviour

Router doesn’t get rendered on screen after cloning the project and using it in Android. In IOS it works completely fine with no problems.

My Router definition

        <Router getSceneStyle={() => styles.sceneStyle} navigationBarStyle={{ backgroundColor: 'transparent', borderBottomWidth: 0 }}>
            <Scene transitionConfig={TransitionConfiguration} key="root">
                <Scene key="getHomeNoLogin" initial={true} component={Component1} />
                <Scene key="getLogin" component={Login} />
                <Scene key="getForgotPassword" component={ForgotPassword} />
                <Scene key="getSignup" component={Signup} />
                <Scene key="getHome" component={Home} />
                <Scene key="getInfo" component={Info} title="INFORMAÇÕES" navBar={CustomNavBar} />
                <Scene key="getInfoDashboard" component={InfoDashboard} navBar={CustomNavBar} />
                <Scene key="getInfoDetails" component={InfoDetails} navBar={CustomNavBar} />
                <Scene key="getSchedule" component={Schedules} title="Tratamentos" navBar={CustomNavBar} />
                <Scene key="getAlerts" component={Alerts} title="ALERTAS" navBar={CustomNavBar} />
                <Scene key="getHistory" component={History} title="HISTÓRICO" navBar={CustomNavBar} />
                <Scene key="getSettings" component={Settings} title="DEFINIÇÕES" navBar={CustomNavBar} />
            </Scene>
        </Router>

My App.js

    return (
      <Provider store={store}>
        <View style={{ flex: 1, backgroundColor: 'transparent' }}>
          <NavRouter />
        </View>
      </Provider>
      );

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
Blapicommented, Feb 19, 2018

Great! 😃

0reactions
dvlprmartinscommented, Feb 19, 2018

I was able to get it working by removing the negative marginTop, seems like React-Native in android doesn’t supports it. I also had to set my video style to:

        position: 'absolute',
        top: 0,
        left: 0,
        bottom: 0,
        right: 0
Read more comments on GitHub >

github_iconTop Results From Across the Web

Reactjs screen is not rendering - Stack Overflow
Only when I created and applied the code in this class, the screen started don't render and stays white. I already changed the...
Read more >
Navigation 'back' button won't render on Android for scenes ...
Issue can be reproduced on Example project. Given we have scene with 'back' attribute passed navigation.state.key}/> Router renders 'back' ...
Read more >
Slow rendering - Android Developers
If your app suffers from slow UI rendering, then the system is forced to skip frames and the user will perceive stuttering in...
Read more >
Fix the slow render before you fix the re-render - Kent C. Dodds
A "render" is when React calls your function to get React elements. ... Just because a component is re-rendered, doesn't mean that will ......
Read more >
Creating Server-side Rendered Vue.js Apps Using Nuxt.js
When initially loading your website, your browser doesn't receive a complete page to display. Instead, it gets a bunch of pieces and instructions...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found