question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property show of undefined

See original GitHub issue

Hi,

I’m trying to show the toast but the show function keeps telling me that the Toast is undefined, I’m including the toast inside my App.js and then calling it with Toast.show({ text1: "hello", });

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
calintamascommented, Oct 7, 2020

you can render it outside the nav container

return (
    <>
      <NavigationContainer>...</NavigationContainer>
      <Toast ref={(ref) => Toast.setRef(ref)} />
    </>
  );
1reaction
calintamascommented, Oct 7, 2020

you can do it like this

<>
   <RootNavigator />   
   <Toast />
</>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'show' of undefined - Stack Overflow
lgModal); returns undefined and this.lgModal.show(); gives an ERROR TypeError: Cannot read property 'show' of undefined error.
Read more >
Uncaught TypeError: Cannot read property 'show' of undefined
I am having a problem with a small programme that I was making on a JavaScript framework known as p5js. All I wanted...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
What Causes TypeError: Cannot Read Property of Undefined ... Undefined means that a variable has been declared but has not been assigned a...
Read more >
[regression-9.0.0] TypeError: Cannot read property 'show' of ...
Website: https://web.hike.in/. Error: Uncaught Exception: TypeError: Cannot read property 'show' of undefined
Read more >
Uncaught TypeError: Cannot read property 'show' of undefined
hello please i need some help here my cose is showing Uncaught TypeError: Cannot read property 'show' of undefined at HTMLTableCellElement.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found