[Snackbar] TypeError: _props.toast is undefined when import single component
See original GitHub issueDescription
When importing with
import Snackbar from 'react-md/lib/Snackbars/Snackbar';
browser logs this error and the page doesn’t load (blank)
TypeError: _props.toast is undefined
but this bug isn’t presented if I use
import { Snackbar } from 'react-md';
then the page loads and snackbar emits toast sucessfully.
Version
- React - 15.5.4
- React-MD - 1.3.0
- Browser Firefox 59.0.2
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
reactjs - Unable to use a hook in a component - Stack Overflow
It seems like your snackbar.js is not a component. You can only use hooks inside components. – polcats. Aug 13, 2020 at 1:58....
Read more >Support for displaying snackbar outside of component #30
Store the enqueueSnackbar & closeSnackbar in the some class variable at the time of startup of the application, And use anywhere in your...
Read more >notistack - npm
It is highly customizable and enables you to stack snackbars/toasts on top of one another. Visit documentation website for demos.
Read more >Toasts - React-Bootstrap Documentation
This is a toast message. import Toast from 'react-bootstrap/Toast'; function BasicExample() { return ( <Toast> <Toast.
Read more >“TypeError: Cannot read property 'open' of undefined”
In my laravel project I'm using a package called LaraToaster https://github.com/theorythree/LaraToaster i do what the package required LaraToaster.vue.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That worked, thank you.
Please see the documentation notes