March 2019
Intermediate to advanced
534 pages
14h 52m
English
Let's say that your application has three pages, and you need three buttons that link to each of them. You'll probably need buttons to link to them from arbitrary places too, as the application grows. Here's the code to do it:
import React from 'react';import { Switch, Route, Link } from 'react-router-dom';import { withStyles } from '@material-ui/core/styles';import Grid from '@material-ui/core/Grid';import Button from '@material-ui/core/Button';import Typography from '@material-ui/core/Typography';const styles = theme => ({ content: { margin: theme.spacing(2) }});const LinkButtons = withStyles(styles)(({ classes }) => ( <Grid container direction="column" className={classes.container}> <Grid item> <Grid container> <Grid item> ...Read now
Unlock full access