Grommet: Proposal: Rename the Anchor component to Link.

Created on 26 Aug 2019  路  4Comments  路  Source: grommet/grommet

This is a follow up ticket based on a discussion that occurred on the Grommet Slack.

The long story short is that Grommet would be greatly improved by calling their link component some variation of <Link/> instead of <Anchor/>.

Yes, we know that <a> means anchor element, but it's not intuitive in the context of a React application. In React, for better or worse, React Router has the large market share for SPA-based navigation and they call links "Link" (<Link/> and <NavLink/>).

Also, lot of other popular component libraries call them Link, including:

enhancement in progress

Most helpful comment

I'm open to this change. Could we would do it in a backwards compatible way, supporting both component names until the next major release?

All 4 comments

In the meantime, it would be good to alias it in the docs. So that searching "Link" does not result in a dead-end.

Thank you @iMerica for following up with an enhancement request.

Linking to:
https://grommet.slack.com/archives/C04LMHN59/p1566697838423000

and some parts of https://grommet.slack.com/archives/C04LMHN59/p1566697869423500

Great idea! The only tedious thing of this change would be migration in large apps, but I like it!

I'm open to this change. Could we would do it in a backwards compatible way, supporting both component names until the next major release?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

csclyde picture csclyde  路  3Comments

ShimiSun picture ShimiSun  路  4Comments

santaclauze picture santaclauze  路  3Comments

Primajin picture Primajin  路  4Comments

Kitanotori picture Kitanotori  路  4Comments