Nativebase: Issue with Fab and Toast after update to 2.2.1

Created on 21 Jul 2017  路  12Comments  路  Source: GeekyAnts/NativeBase

I updated from 2.1.5 to 2.2.1 and have two bugs now:

Toast ist not working like here: https://github.com/GeekyAnts/NativeBase/issues/836#issuecomment-317072372

and

FAB backgroundColor is not changing. It is always blue.

            {Platform.OS != 'ios' &&
              <Fab
                  active={this.state.fabactive}
                  direction="up"
                  containerStyle={{ marginLeft: 0, marginBottom: 0 }}
                  style={{ backgroundColor: '#4CAF50' }}
                  position="bottomRight"
                  onPress={() => this.setState({ fabactive: !this.state.fabactive })}>
                  <Ionicons name="md-more" />

                  <Button style={{ backgroundColor: '#FFFFFF' }} onPress={this.logout.bind(this)}>
                    <Ionicons name="md-log-out" />
                  </Button>
                  <Button style={{ backgroundColor: '#FFFFFF' }} onPress={() => Linking.openURL('mailto:[email protected]?subject=Feedback%20zur%20Mittagessen-App')}>
                    <Ionicons name="md-mail" />
                  </Button>
              </Fab>
            }

Am i missing something? Same with 2.3.0.

    "native-base": "^2.3.0",
    "react": "16.0.0-alpha.12",
    "react-native": "https://github.com/expo/react-native/archive/sdk-19.0.0.tar.gz",
awaiting response bug

Most helpful comment

@eggybot @lanceharper The issue seems to be with android. Will be fixed in the next patch

All 12 comments

Got the same issue but I added <Root> tag in my main app and it works, try to check the doc for
https://docs.nativebase.io/Components.html#Toast

Also I didn't post this issue yet but I got again the error evaluating 'this.toastInstance._root' Error when I tried hopping different screen/pages back and fort and the error is showing randomly.

screen shot 2017-07-24 at 8 06 15 pm
@shuffgy Fab works fine in version 2.3.0

I am experiencing the same issue although I ejected in order to provide some customization. I'll provide an update if I determine the underlying cause.

@eggybot @lanceharper The issue seems to be with android. Will be fixed in the next patch

When will you release the next patch? I'm having the same issue:

evaluating 'this.toastInstance._root' Error

Morover I'm not able to import the Root element:

untitled

Any solution?

Next patch will be released by end of this week
@bm-software What version NativeBase are you using

@shivrajkumar Nice! I'm using version 2.3.0

@shivrajkumar Sorry for asking but could you let us know here when the patch has been released?
Thank you very much!

@shivrajkumar Now the problem is solved. Toast works but the import error still exists:

28623521-8a136f04-7216-11e7-9162-cdfc62cde886

Seems that a typing is missing.

@bm-software Root typing has been added in the latest version v2.3.2

@shivrajkumar Unfortunately the evaluating 'this.toastInstance._root' Error issue is still present but I'm getting it only on Android release builds, on developer build (while testing) it's not present.

I think that this issue should be reopened.

Any news on this? I'm getting the same error on Android.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nschurmann picture nschurmann  路  3Comments

omerdn1 picture omerdn1  路  3Comments

muthuraman007 picture muthuraman007  路  3Comments

georgemickael-b picture georgemickael-b  路  3Comments

maphongba008 picture maphongba008  路  3Comments