Skip to content

Commit 5f881db

Browse files
denis-sokolovtimdorr
authored andcommitted
Bring back documentation on Link DOM props (remix-run#5799)
In v3 the docs [clearly indicated](https://github.com/ReactTraining/react-router/blob/07d6b50ab9a9b6d1940d67abe530044be7f7dc99/docs/API.md#others) that `<Link>` takes DOM props to be put on `<a>`. In v4 docs this information [is missing](https://reacttraining.com/react-router/web/api/Link). Nevertheless, the functionality [is still here](https://github.com/ReactTraining/react-router/blob/96410c69be1ca32e294bf83e7d1321c39ecd286b/packages/react-router-dom/modules/Link.js#L76). The contributors [refer to it](remix-run#5760 (comment)) as expected, public functionality. The [`activeClassName` prop on `NavLink`](https://reacttraining.com/react-router/web/api/NavLink/activeClassName-string) clearly suggests that a regular `className` is also accepted.
1 parent 96410c6 commit 5f881db

File tree

1 file changed

+5
-0
lines changed
  • packages/react-router-dom/docs/api

1 file changed

+5
-0
lines changed

packages/react-router-dom/docs/api/Link.md

+5
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,8 @@ const refCallback = node => {
5353

5454
<Link to="/" innerRef={refCallback} />
5555
```
56+
57+
## others
58+
59+
You can also pass props you'd like to be on the `<a>` such as a `title`, `id`, `className`, etc.
60+

0 commit comments

Comments
 (0)