Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.

Fix render type of RouteProps. #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

juri-t
Copy link

@juri-t juri-t commented Apr 27, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant