RL0306 / twitter-clone

0 stars 0 forks source link

Use generics when getting values from an endpoint #1

Open marianpmd opened 2 years ago

marianpmd commented 2 years ago

https://github.com/RL0306/twitter-clone/blob/f382283cba48d8f6ec1d6f9c69939c5e834351f3/twitter-clone-front/src/components/HomeHeader.tsx#L15

marianpmd commented 2 years ago

Check this : https://github.com/axios/axios/issues/1510#issuecomment-385939438

You want the type definitions there because it helps with intellisense and type safety, which are the most useful ts features