Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 2 months ago

Weather-web-application

vite, react, van-js, pure-css
Joseph Abdullaahi•320
@Joseph-Abdullaah
A solution to the Weather app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

Most Proud Of

  • Clean Architecture: Perfect separation of WeatherContext & UnitContext
  • Smart UX: Works instantly with Berlin, enhances with user location
  • Professional Polish: Debounced search, smooth loading states, proper error handling
  • Maintainable Code: Modular components, predictable data flow

Do Differently

  • Use React Query instead of manual API handling
  • Add TypeScript for better type safety
  • Implement proper testing (Jest + React Testing Library)
  • Add offline support with service workers
  • Use Next.js for SSR and better performance
What challenges did you encounter, and how did you overcome them?

Challenges & Solutions

Geolocation Blocking

Problem: Can't auto-request location on page load Fix: Show Berlin weather first, then ask permission

API Spam During Search

Problem: Typing triggered too many API calls Fix: Added 300ms debouncing

Complex State Management

Problem: Multiple states getting tangled Fix: Separated WeatherContext & UnitContext

Unit Conversion Accuracy

Problem: Client-side conversion vs API data mismatch Fix: Refetch API with new unit parameters

Browser Inconsistency

Problem: Geolocation worked differently across browsers Fix: Feature detection + conservative timeouts

API Data Structure

Problem: Weather codes needed icon mapping Fix: Built robust transformation helpers

What specific areas of your project would you like help with?

Need Help With:

  • Better project structure & file organization
  • Layout component patterns
  • Search loading UI design
  • When to show loading skeletons
  • Feedback in goelocation API to get user location in his first visit of the page and reder the data
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 Joseph Abdullaahi'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