willianjusten / nba-remix

A simple app to show NBA games and scores/details.
https://nba.willianjusten.com.br
208 stars 31 forks source link

[IMPROVEMENT] Improve types within routes #109

Closed vedovelli closed 2 years ago

vedovelli commented 2 years ago

Problem

CleanShot 2022-03-20 at 19 50 13

When using useLoaderData() hook, we are not receiving strongly typed objects.

Solution

CleanShot 2022-03-20 at 19 50 28

This PR introduces a new type LoaderData which is used in 2 different places within routes:

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/willianjusten/nba-remix/6tkjTGxqrLMxbBQe7GHwPmMLEPr8
✅ Preview: https://nba-remix-git-fork-vedovelli-improve-typings-willianjusten.vercel.app

willianjusten commented 2 years ago

Hey! Glad to see you here =) That was something that I pointed on #14 that I wanted to address, thanks for fixing it!

adeonir commented 2 years ago

Thanks @vedovelli, very good!

vedovelli commented 2 years ago

🚀