Skip to content

Instantly share code, notes, and snippets.

@niksumeiko
Last active June 30, 2024 20:33
Show Gist options
  • Save niksumeiko/83404b80456072ee64fa0602a0a66e31 to your computer and use it in GitHub Desktop.
Save niksumeiko/83404b80456072ee64fa0602a0a66e31 to your computer and use it in GitHub Desktop.
Exercise for React Native developer job technical interview

Overview

Provide weather and water forecasts to the customer to find a good day for a swim.

Acceptance criteria

  1. Create a view to display the following information:
    • Title
    • Location (static)
    • Day selector
  2. Request the backend for weather and water forecast:
    • Request data when the day gets selected
    • Display a loading state indicator while data is being retrieved
  3. Display weather and water forecast
    • When clouds is under 10, output "Sunny"
    • When clouds is under 50, output "Mostly sunny"
    • When clouds is over 50, output "Cloudy"
    • When waves is 0, output "No waves"
    • When waves is over 30, output "Some waves expected"
    • When waves is over 60, output "Big waves"
  4. Automatically move the logo right/left when the device gets rotated
    • The rotation shall be tracked only on the Y axis
    • When the rotation value grows, the logo moves left
    • When the rotation value gets reduced, the logo moves right

Integration

It's yet unknown what will be the Backend. Probably some cloud SaaS (e.g., supabase, nhost, cloudflare, aws).

Expected input

type Input = {
  location: name;
  date: string(ISO Date);
};

Expected output

type Forecast = {
  location: { name: string; };
  date: string(ISO Date);
  clouds: number(0-100);
  air_temp_c: number;
  air _temp_f: number;
  waves: number(0-10)
};
@niksumeiko
Copy link
Author

niksumeiko commented Jun 30, 2024

Design

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment