react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Incorrect behavior on bottom navigator

Open roman-huliak opened this issue 7 years ago • 4 comments

Current behaviour

Bottom navigator randomly shaking. As in attachment navigator sometimes not working correctly. Whole app will freeze and i must force quit. All that without error in console. This behavior start imidiately with render(), cpu is on 100%, normally (normally 5-10% on this screen). I can't click in header (or gesture) to back or click in navigator to change screen. Reproducing this is hard becauce it's random&luck.

Thanks for every message.

Code sample

import * as React from 'react';
import Icon from 'react-native-vector-icons/dist/MaterialIcons';
import {BottomNavigation, Text} from 'react-native-paper';
import {createMaterialBottomTabNavigator} from 'react-navigation-material-bottom-tabs';

import EvidenceWaitingScreen from './waiting';
import EvidenceApprovedScreen from './approved';

export default createMaterialBottomTabNavigator({
    invoices: {
        screen: EvidenceWaitingScreen,
        navigationOptions: {
			tabBarLabel: 'Čakajúce',
            tabBarIcon: ({tintColor, focused}) => (<Icon color={tintColor} size={20} name='access-time'/>)
        }
    },
    orders: {
        screen: EvidenceApprovedScreen,
        navigationOptions: {
			tabBarLabel: 'Schválené',
            tabBarIcon: ({tintColor, focused}) => (<Icon color={tintColor} size={20} name='check-circle'/>)
        }
    }
}, {
    initialRouteName: 'invoices',
    activeColor: '#ffffff'
});

Screenshots (if applicable)

ezgif com-video-to-gif

What have you tried

Updated to latest version, Create simple (only text message) screens for navigator.

Your Environment

software version
ios or android ios device&simulator
react-native 0.57.8
react-native-paper 2.7.0
node 11.7.0
npm 6.7.0

roman-huliak avatar Feb 01 '19 19:02 roman-huliak

Can you downgrade to 2.2.0 and check? I'll take a look at the issue as soon as I can.

satya164 avatar Feb 01 '19 19:02 satya164

Ok, so figured it out. It was SafeAreaView triggering random onLayout events. I'll replace it with something else.

satya164 avatar Feb 01 '19 21:02 satya164

Please try the latest release and let me know if it fixes the issue for you

satya164 avatar Feb 01 '19 22:02 satya164

Please try the latest release and let me know if it fixes the issue for you

Hi, How can I upgrade to latest version? I also have this problem.

pouya92 avatar Feb 16 '19 20:02 pouya92