hyperapp-router icon indicating copy to clipboard operation
hyperapp-router copied to clipboard

Fix render type of RouteProps.

Open juri-t opened this issue 6 years ago • 0 comments

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

juri-t avatar Apr 27 '19 16:04 juri-t