Skip to content
This repository was archived by the owner on May 20, 2021. It is now read-only.

Add restProps to anchor #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class LinkWithNavigation extends Component {
routeKey,
navigation,
action,
...restProps,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we renamed this to anchorProps, (with no "..." spreading) so that the use is explicit. I want to make sure we can add functionality to this component in the future, without breaking people's apps. This way we don't have the same namespace as the component

} = this.props;
const topNavigation = getTopNavigation(navigation);
const topRouter = topNavigation.router;
Expand Down Expand Up @@ -62,6 +63,7 @@ class LinkWithNavigation extends Component {
navigation.dispatch(navAction);
e.preventDefault();
}}
{...restProps}
>
{children}
</a>
Expand Down