Re:Comparing Svelte and React
by efrafa on Wednesday March 24, 2021 @05:42PM
(#26573330)
There are valid reason to do that. Like a component that takes render function and item that is passed into it that can be anything.
[ Parent
| on HN ]
You can do that, but you don't have to.
See my example here at line 26: https://codesandbox.io/s/clever-neumann-89tnx?file=/src/App....
Typescript will inherit the type automatically.
Re:Comparing Svelte and React
by kecupochren on Thursday March 25, 2021 @05:49AM
(#26578176)
That's amazing, thanks for the tip