Nativebase: OnPress not working on Button

Created on 23 Aug 2020  路  6Comments  路  Source: GeekyAnts/NativeBase

"native-base": "^2.13.13",
"react": "16.13.1",
"react-native": "^0.63.2",

I have 2 buttons on a screen. One inside Content and one outside Content. The outside button not working.
Even if I remove Footer and FooterTab still the issue is there.

<Container>
        <Content>
            <Button
                danger
                onPress={() => alert()}>

                <Text style={{
                    color: "#fff",
                    fontSize: 15,
                    marginLeft: 5
                }}>
                    WORKING
                </Text>
            </Button>
        </Content>
        <Footer>
            <FooterTab>
                <Button
                    danger
                    onPress={() => alert()}>
                    <Text style={{
                        color: "#fff",
                        fontSize: 15,
                        marginLeft: 5
                    }}>
                        NOT WORKING
                </Text>
                </Button>
            </FooterTab>
        </Footer>
    </Container>

screenshot-2020-08-23_13 42 52 342

Most helpful comment

Hello, I am using react-native 0.63.3 and native base 2.13.14. Still facing the problem. Previously I solved it by downgrading to 2.13.8. But after upgrading my react-native version, it stopped working. Then I have tried 2.13.14. Is there anything else i should do.

N.B. yarn was used to install everything.

All 6 comments

Is it not working after the toast message is displayed at the bottom of the screen?
If so, your issue is probably related to this bug #3196
There was a recent release to fix this bug so update it to the latest version and that should fix it.

Try upgrade to 2.13.14. That version has the fix for this issue.

Yes, it worked, after upgrade.

Hello, I am using react-native 0.63.3 and native base 2.13.14. Still facing the problem. Previously I solved it by downgrading to 2.13.8. But after upgrading my react-native version, it stopped working. Then I have tried 2.13.14. Is there anything else i should do.

N.B. yarn was used to install everything.

v2.13.15 has the same issue, button onPress is non-functioning with react-native 0.63.3

For all those people who are still facing the issue, I failed to find a good solution rather a work around. I used a custom component consisting buttons to create a custom footer. Although it is not the perfect solution but it works!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muthuraman007 picture muthuraman007  路  3Comments

natashache picture natashache  路  3Comments

sihemhssine picture sihemhssine  路  3Comments

agersoncgps picture agersoncgps  路  3Comments

omerdn1 picture omerdn1  路  3Comments