File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/react-router-dom/docs/api Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,14 @@ let anchorRef = React.createRef()
84
84
85
85
## component: React.Component
86
86
87
- If you would like utilize your own navigation component, you can simply do so by passing it through the ` component ` prop.
87
+ If you would like utilize your own navigation component, you can do so by passing it through the ` component ` prop.
88
88
89
89
``` jsx
90
- const FancyLink = React .forwardRef (({ navigate, ... props }, ref ) => (
91
- < a ref= {ref} {... props}> 💅 {props .children }< / a>
92
- ))
90
+ const FancyLink = React .forwardRef (({ navigate, ... props }, ref ) => {
91
+ return (
92
+ < a ref= {ref} {... props} onClick= {handleClick}> 💅 {props .children }< / a>
93
+ )
94
+ })
93
95
94
96
< Link to= " /" component= {FancyLink} / >
95
97
```
You can’t perform that action at this time.
0 commit comments