4 ms·
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.
by efrafa 6y ago
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.
- patwoz 6y agoYou 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.tsx https://codesandbox.io/s/clever-neumann-89tnx?file=/src/App.... Typescript will inherit the type automatically.
- kecupochren 6y agoThat's amazing, thanks for the tip