All Projects → DaxChen → material-ui-Link-within-MenuItem

DaxChen / material-ui-Link-within-MenuItem

Licence: other
Example for how to use `react-router/Link` within `material-ui/MenuItem`

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to material-ui-Link-within-MenuItem

tmdb-viewer
A movie browsing/favoriting app
Stars: ✭ 63 (+231.58%)
Mutual labels:  react-router, material-ui
Online Shop
Online shop prototype implemented in React.
Stars: ✭ 168 (+784.21%)
Mutual labels:  react-router, material-ui
Create React App Material Typescript Redux
A ready to use boilerplate for starting big react projects
Stars: ✭ 257 (+1252.63%)
Mutual labels:  react-router, material-ui
chatty
A React single-page-application alternative client for the shacknews chatty.
Stars: ✭ 27 (+42.11%)
Mutual labels:  react-router, material-ui
react-relay-example
Example project how to use React, Relay and TypeScript
Stars: ✭ 27 (+42.11%)
Mutual labels:  react-router, example-project
Google-Photos-Clone
Google Photos Clone Built with React🚀 and Firebase🔥
Stars: ✭ 17 (-10.53%)
Mutual labels:  react-router, material-ui
Starter React Flux
Generate your React PWA project with TypeScript or JavaScript
Stars: ✭ 65 (+242.11%)
Mutual labels:  react-router, material-ui
cra-flask
Unejected create-react-app ui, flask api with token authentication
Stars: ✭ 20 (+5.26%)
Mutual labels:  react-router, material-ui
React Cnodejs.org
Material UI version of cnodejs.org, the biggest Node.js Chinese community.
Stars: ✭ 242 (+1173.68%)
Mutual labels:  react-router, material-ui
Wanna
💡✔ Wanna is an implementation of a 21st-century to-do list app.
Stars: ✭ 189 (+894.74%)
Mutual labels:  react-router, material-ui
firefox-health-dashboard
firefox-health-dashboard.netlify.com
Stars: ✭ 26 (+36.84%)
Mutual labels:  react-router, material-ui
keep-graph
Keep Graph is a open source clone of Google Keep. It's built on top of React and GraphQL.
Stars: ✭ 29 (+52.63%)
Mutual labels:  react-router, material-ui
Google-Clone
A Google Clone which built with ReactJS. When you click Gmail button, you will be directed to my other project, Gmail Clone. You can search whatever you want and send realtime emails by clicking Gmail button!
Stars: ✭ 37 (+94.74%)
Mutual labels:  react-router, material-ui
backoffice
React GUI-Framework based on Material UI; provides a couple of components for back-office apps (CRUD-based APIs)
Stars: ✭ 17 (-10.53%)
Mutual labels:  react-router, material-ui
io-dev
IO Dev is a portfolio website to showcase the work and projects I have created
Stars: ✭ 22 (+15.79%)
Mutual labels:  react-router, material-ui
Web
⚡️ Supercharged version of Create React App with all the bells and whistles.
Stars: ✭ 594 (+3026.32%)
Mutual labels:  react-router, material-ui
Razzle Material Ui Styled Example
Razzle Material-UI example with Styled Components using Express with compression
Stars: ✭ 117 (+515.79%)
Mutual labels:  material-ui, example-project
Express React Boilerplate
Express, MySQL, React/Redux, NodeJs Application Boilerplate
Stars: ✭ 179 (+842.11%)
Mutual labels:  react-router, material-ui
Frontend
마음을 잇는 현명한 소비 '잇다'🤝
Stars: ✭ 19 (+0%)
Mutual labels:  react-router, material-ui
PERN-Advanced-Starter
Advanced PERN stack starter kit (PostgresSQL, Express, React, & Node), complete with ESLint, Webpack 4, Redux, React-Router, and Material-UI kit.
Stars: ✭ 51 (+168.42%)
Mutual labels:  react-router, material-ui

react-router/Link within material-ui/MenuItem

Example for how to use react-router/Link within material-ui/MenuItem

This project was bootstrapped with Create React App.

Live Demo

What is this?

This is an example app for this issue, which demonstrates using react-router's Link within material-ui's MenuItem with the containerElement prop.

import { Link } from 'react-router'
import MenuItem from 'material-ui/MenuItem'

<MenuItem
  containerElement={<Link to="/about" />}
  primaryText="About Page"
/>

For more information, see the above issue, or this StackOverflow.

FAQ

Why not `href`?

Using href instead of react-router's Link component will cause the page to reload

Why not `onTouchTap` and programmically change route?

Using onTouchTap/onClick to trigger page change instead of <a>/<Link /> will lose some native features such as the link previewing in browser status bar, and the ability for users to open link in a new tab (mousewheel-click, cmd + click on macOS, ctrl + click on windows, click and hold on mobile devices, etc.).

How to run

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].