kaliberjs / kaliberjs/routing

How can I derive the active state for links?

Open
#5 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I don’t see an option to set an active class on the Link component. What would be the workflow to get this working?

I thought I might use `useMatchedRoute` but it is not really the same as an active indicator.

In reach-router there is a function getProps you can return props you want to add the props of the rendered link. It gives you two variables `isPartiallyCurrent` and `isCurrent` this is really handy if you have in main menu and sub navigation.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.