With larger Material-UI applications, you're likely to find yourself in a situation where more than one snackbar message is sent in a very short period of time. To deal with this, you can create a queue for all snackbar messages so that only the most recent notification is displayed, and so that the transitions are handled properly.
Queuing snackbars
How to do it...
Let's say that you have several components throughout your application that need to send snackbar messages to your users. Having to manually render Snackbar components everywhere would be cumbersome—especially if all you're trying to do is display simple text snackbars.
One alternative approach is to implement a higher-order component that...