Material-ui: Link doesn't work with component prop

Created on 1 Oct 2020  路  1Comment  路  Source: mui-org/material-ui

  • [x] The issue is present in the latest release.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸


When I pass component="button" to Link, it is not routing to the url mentioned in the href attribute nor I see any error log in console.

Expected Behavior 馃


Should take user to the url mentioned in the href attribute

Steps to Reproduce 馃暪

I created a live example using CodePen

Steps:

  1. Add Link component to the app
  2. Mention component="button" as prop
  3. Add your link to href attribute
  4. Try clicking on the Link, it won't route you.

Context 馃敠

Your Environment 馃寧

| Tech | Version |
| ----------- | ------- |
| Material-UI | v4.11.0 |
| React | 16.12.0 |
| Browser | Chrome |

Link question

Most helpful comment

<button href="" /> isn't valid HTML. What are you trying to achieve?

>All comments

<button href="" /> isn't valid HTML. What are you trying to achieve?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

mb-copart picture mb-copart  路  3Comments

ghost picture ghost  路  3Comments

anthony-dandrea picture anthony-dandrea  路  3Comments

finaiized picture finaiized  路  3Comments