Nativebase: ypeError: undefined is not an object (evaluating 'this.toastInstance._root')]

Created on 28 Jul 2018  ·  10Comments  ·  Source: GeekyAnts/NativeBase

Hi, i get ypeError: undefined is not an object (evaluating 'this.toastInstance._root')]
on any toast show:

my method:
_show_toast(type) {
Toast.show({
text: 'Wrong password!',
buttonText: 'Okay',
type: type
})
}

awaiting response

Most helpful comment

Wrapping the component in <Root> will do the trick. <Root> is imported from native-base

All 10 comments

I checked this in NativeBase KitchenSink with latest NativeBase, Toast types worked fine

Share more details, and please follow the issue template guidelines

Closing this due no response

你的主应用程序组件是否包含在内<Root>?前几天我遇到了这个问题,并为我解决了这个问题。请参阅文档:https//docs.nativebase.io/Components.html#Toast

you can reference this

thank you very much @StevenT1

Wrapping the component in <Root> will do the trick. <Root> is imported from native-base

NativeBase Toast can be used to display quick warning or error messages. For Toast to work, you need to wrap your topmost component inside from native-base.

Read

Hi, for the record I am seeing this error with latest NativeBase with <Root> as my topmost element. It seems to only occur for android after users have changed to a different Activity from the main app and back (in our case, when we have done an await PermissionsAndroid.request());

Wrapping the component in <Root> will do the trick. <Root> is imported from native-base

It Does. Thanks @saran-shabd

@jenni-divvito exact same case here. Did you find a work around?

I'm having same issue here. somebody help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

georgemickael-b picture georgemickael-b  ·  3Comments

agersoncgps picture agersoncgps  ·  3Comments

natashache picture natashache  ·  3Comments

kitsune7 picture kitsune7  ·  3Comments

aloifolia picture aloifolia  ·  3Comments