Text is the most common form of Snackbar message content that you'll display for your users. Because of this, the Snackbar component makes it straightforward to set message content and display the snackbar.
Snackbar content
How to do it...
The message property of the Snackbar component accepts a string value, or any other valid React element. Here's the code that shows you how to set the content of the Snackbar component and display it:
import React from 'react';
import Snackbar from '@material-ui/core/Snackbar';
const MySnackbarContent = () => <Snackbar open={true} message="Test" />;
export default MySnackbarContent;
When the page first loads, you'll see a snackbar that looks...