Sudoku with React Native Reanimated & Skia
Thursday, April 3, 2025
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