Maxence• 170
@MaeWolff
Posted
Hi Matheus!
I've identified a few things to improve:
- Your custom hook
CallCountriesAPI
should be named with the prefixuse
(souseCountries
for example) to respect the convention rules and allow the linter to check if you are using the hook according to the rules of the react hooks - You can type your states in the following way:
const [state, setState] = useState<YOUR_TYPE_HERE>(defaultValue)
- Avoid using the type
any
, maybe useunknown
or create the real types
Congrats on your post :)
Marked as helpful
1