File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ We can use `Link` as well by passing it the `onlyActiveOnIndex` prop
4242(` IndexLink ` just wraps ` Link ` with this property for convenience).
4343
4444``` js
45- < li>< Link to= " /" activeClassName= " active" onlyActiveOnIndex> Home< / Link>< / li>
45+ < li>< Link to= " /" activeClassName= " active" onlyActiveOnIndex= { true } > Home< / Link>< / li>
4646```
4747
4848That's fine, but we already abstracted away having to know what the
@@ -53,7 +53,7 @@ the `{...spread}` syntax, so we can actually add the prop when we render
5353a ` NavLink ` and it will make its way down to the ` Link ` :
5454
5555``` js
56- < li>< NavLink to= " /" onlyActiveOnIndex> Home< / NavLink>< / li>
56+ < li>< NavLink to= " /" onlyActiveOnIndex= { true } > Home< / NavLink>< / li>
5757```
5858
5959---
You can’t perform that action at this time.
0 commit comments