March 2019
Intermediate to advanced
534 pages
14h 52m
English
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 like this:

Read now
Unlock full access