preactjs / preact-router

:earth_americas: URL router for Preact.

Home Page:http://npm.im/preact-router

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type definition doesn't allow function to be passed into `<Match />` `children`.

kim3er opened this issue · comments

This should work:

<Match path="/cookie-policy">
  {({ matches }) => !matches && <CookieConsent />}
</Match>

But the following error is returned:

Binding element 'matches' implicitly has an 'any' type.ts(7031)