andrejewski / raj-react

React bindings for Raj
MIT License
9 stars 1 forks source link

Add typings #26

Open jonaskello opened 6 years ago

jonaskello commented 6 years ago

These typings build on the typings from the PR in the raj package and provide some context for further discussion.

jonaskello commented 6 years ago

Specifically this part which closes the generic V in the Program type to provide a ReactProgram type that has a View that return ReactNode. Not sure if it is needed or makes sense, but it is the way I did it when I tried out raj.

export type ReactProgram<S, M> = Program<S, M, React.ReactNode>;