Skip to content

Add axios for API token with react-query #76

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

Merged
merged 2 commits into from
Feb 28, 2022
Merged

Conversation

flexbox
Copy link
Owner

@flexbox flexbox commented Feb 28, 2022

This pull request is an example to answer this question

How to call an external API with auth token the right way?

  • Picture comes from the genius API
  • added dotenv and expo-constants for GENIUS_API_KEY
  • Added axios for Authorization token with react-query

kudos to @Cretezy for his article React Query + Axios for authentication

Preview

IMG_BA138E84038C-1

@flexbox flexbox requested a review from MatthysDev February 28, 2022 15:40
@flexbox flexbox merged commit cffeaf3 into main Feb 28, 2022
@flexbox flexbox deleted the feature/genius-api branch February 28, 2022 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants