Closed rluiten closed 6 years ago
Reasons include:
raj-react
supports both React 15 and 16 and most likely 17 and potentially older versions as well as it doesn't do anything crazy.This is a small typing inconvenience since you will only call raj-react
once per app. I think it gives the developer much more control and for me as a maintainer it is easier to maintain.
All good points, I asked because I suspect you had reasons.
Typing makes that sort of overload more complex each type would need to be added to the type of the Component and because the types are in the modules you would need to make a dependency on each one, or step back to an accept any type case, hmm just realised I could possibly make the return type generic just like in rajts.
Thanks.
I am trying to understand why you pass Component as a parameter to
reactProgram
rather than just extend React.Component ? The only benefit I can think of is that you may have a use case that supplies something other than the common React.Component as the parameter, do you have such an example ?I am the person who posted on your Raj 1.0 thread https://www.reddit.com/r/javascript/comments/8st3bi/raj_the_elm_architecture_for_javascript_releases/ with the typescript version just to give you context.