Closed vedovelli closed 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
Hey! Glad to see you here =) That was something that I pointed on #14 that I wanted to address, thanks for fixing it!
Thanks @vedovelli, very good!
🚀
Problem
When using
useLoaderData()
hook, we are not receiving strongly typed objects.Solution
This PR introduces a new type
LoaderData
which is used in 2 different places within routes:json()
to generate a JSON Response;useLoaderData()
.