hyperapp-router
hyperapp-router copied to clipboard
Fix render type of RouteProps.
Nice to meet you.
If I used Hyperapp v1 in TypeScript, I corrected it because Route can not interpret types well.
render seems to assume a function that returns VNode, but I think it would be better to receive Component more widely, but would you suggest it?
Now
export const Hoge = (): VNode<RenderProps<{}>> => {
return ( ... )
}
<Route path="/something" render={Hoge}/>
But I want to use
export const Hoge: Component<RenderProps<{}>> = () => {
return ( ... )
}
Thank you
Hyperapp 1.2.5 TypeScript 3.1.4