Nice! But it's more useful to export a fetch action instead of the data. This way you can fetch data when you need it instead of doing it only on mount. You also need something like redux or context to set/get the api response.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice! But it's more useful to export a fetch action instead of the data. This way you can fetch data when you need it instead of doing it only on mount. You also need something like redux or context to set/get the api response.