Sign in to Reactiive

Use your Google or Apple account.
Signing in subscribes you to the newsletter: new content and the occasional promotion. Unsubscribe at any time.
Skip to content

Sudoku with React Native Reanimated & Skia

Thursday, April 3, 2025
enzomanuelmangano
demos
sudoku
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
During a period in my life, I was really into Sudoku. I considered creating a Sudoku app multiple times but never actually took the time to build it πŸ˜…
A few months ago, I started prototyping some ideas for fun but eventually set them aside.
While I don't plan to publish a new app anytime soon, I thought it would be fun to share the demo with you!
Pro tip: long press on the title to solve programmatically the puzzle and quickly fire the confetti!

Packages Used:

Please consider leaving a star ⭐️ on both repositories!
React Native Fast Confetti is built on top of Reanimated and Skia (Skia must be installed as a dependency).

Project Structure

src/ β”œβ”€β”€ components/ β”‚ └── sudoku-board/ # Main game board component β”‚ β”œβ”€β”€ cell.tsx # Individual cell component β”‚ β”œβ”€β”€ cell-container.tsx β”‚ β”œβ”€β”€ constants.ts β”‚ β”œβ”€β”€ index.tsx β”‚ └── styles.ts β”œβ”€β”€ logic/ # Game logic and utilities β”œβ”€β”€ theme/ # Theme configuration └── index.tsx # App entry point

SudokuBoard

The main game board component that manages the game state and renders the interactive Sudoku grid.
import { SudokuBoard } from './components/sudoku-board'; // Usage <SudokuBoard initialBoard={board} // Initial Sudoku puzzle delay={600} // Animation delay in ms onComplete={() => {}} // Callback when puzzle is solved (Used to trigger confetti) ref={sudokuRef} // Ref for accessing solve method />

Props

initialBoard: The initial Sudoku puzzle board
delay?: Animation delay in milliseconds (default: 0)
onComplete?: Callback function when the puzzle is solved

Ref Methods

solve(): Attempts to solve the puzzle programmatically

Unlock the beauty of React Native animations

Learn Reanimated, Gesture Handler & Skia with Reanimate.dev

Feedback on Sudoku

Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback