Skip to content

Conversation

@billybimbob
Copy link

This PR modifies the type definitions to Router and Link in order to better represent their actual implmentations.

The type definitions for the Link component in preact-router and preact-router/match have some ambiguity between each other, which causes problems like #379. The base Link type definition is now more restricted to make clear that activeClassName can only be applied to the match variant.

onClick is also now omitted as a link prop in order to ensure that the onClick handler used by preact-router is not overriden.

The match Link variant can also now take in extra props of activeClass and path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant