NewCode with Beto MCP

React Native Calculator with Dark Mode | Beginner Tutorial 2022

Beto, August 28, 2023 · 3,723 views

A calculator sounds basic until you try to make long numbers fit the screen and support dark mode. That's exactly why I picked it for this beginner project: it forces you to learn state, React Context, and dynamic styles the practical way. I walk through every step in the video, from to the finished app.

What's inside

  • Set up a fresh Expo project with TypeScript
  • Share a light and dark theme app-wide with React Context, no prop drilling
  • Build a reusable button component with style and event props
  • Wire up add, subtract, multiply, and divide with clean state
  • Shrink the display font so long numbers still fit
  • Round out the UX with clear and backspace buttons

Resources

CourseReact Native course

Let's connect!

Had a win? Get featured on Code with Beto.Share your story