Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 2 years ago

React, Axios,Tailwind css, Vite, Github API, useState, import.meta.env

react, tailwind-css, accessibility
Ann Mukami•260
@Kiunga1
A solution to the GitHub user search app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Unable to Fetch Data After Deployment

Hello everyone,

I hope you're doing well. I recently deployed my React Vite app, which was fetching data from the GitHub API during development without any issues. However, I've encountered a challenge after deployment – the app is no longer able to fetch data.

I would greatly appreciate your feedback and assistance in troubleshooting this issue. Here are some details:

  • The app uses Axios to make requests to the GitHub API.
  • I've set up a GitHub token using ``` import.meta.env.VITE_GITHUB_TOKEN````.
  • The app was working perfectly during development, but the data fetching issue surfaced after deployment.

If you have any insights or suggestions on what might be causing this problem, or if there are specific areas in my code that I should review, please let me know. Additionally, if you have encountered similar issues or have best practices for handling API requests in a production environment, I'd love to hear your thoughts.

Thank you in advance for your time and assistance!

Best regards, Ann.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Ann Mukami's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License