Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useApi Hook in Your Examples Does Not Show Any Code #499

Closed
Bilbosax opened this issue Feb 8, 2023 · 1 comment · Fixed by #500
Closed

useApi Hook in Your Examples Does Not Show Any Code #499

Bilbosax opened this issue Feb 8, 2023 · 1 comment · Fixed by #500
Labels
documentation Improvements or additions to documentation

Comments

@Bilbosax
Copy link

Bilbosax commented Feb 8, 2023

I am having a lot of issues successfully creating a useApi hook so I came to your documentation to find out more about it. In your examples at the link below, you have a specific link that says "Create a useApi hook for accessing protected APIs with an access token", but when you click on it it does not take you anywhere, does not display any code, or discuss creating a useApi hook. It is an empty link. Any chance you guys could fill in that section soon?

https://github.com/auth0/auth0-react/blob/master/EXAMPLES.md

We are working on this issue over on the community forums at this link if you want to chime in:

https://community.auth0.com/t/how-to-create-a-useapi-hook/99931

@adamjmcgrath
Copy link
Member

Hi @Bilbosax - thanks for raising this

We used to have an example for that, but we removed that because there's lots of great libraries and resources for how to call APIs with react, eg

Examples of writing your own:

Libraries:

And we felt it's out of scope for an authentication api to teach you how to do data fetching in react.

I'll remove that table of contents item as it shouldn't be there.

Also, If you want to look at the old docs, you can see what it used to be here https://github.com/auth0/auth0-react/blob/v1.12.1/EXAMPLES.md#create-a-useapi-hook-for-accessing-protected-apis-with-an-access-token

@adamjmcgrath adamjmcgrath added the documentation Improvements or additions to documentation label Feb 8, 2023
tyfrth added a commit to tyfrth/docs that referenced this issue Sep 13, 2023
Removing the reference to useAPI as the example has been removed per this issue: auth0/auth0-react#499

I'm also requesting that the broken link in the SDK examples is removed.
tyfrth added a commit to tyfrth/auth0-react that referenced this issue Sep 13, 2023
Removing the link to useAPI example as it doesn't work - The example was removed: auth0#499

Signed-off-by: Ty Frith <tyfrith@gmail.com>
tyfrth added a commit to tyfrth/docs that referenced this issue Sep 13, 2023
Removing link to useAPI as this example was removed per this issue: auth0/auth0-react#499
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants