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
})
}
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
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 fromnative-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!
Most helpful comment
Wrapping the component in
<Root>will do the trick.<Root>is imported fromnative-base