A couple of years ago I was flying to Canada and was bored enought to write a Sudoku solver console app in F# . For some reason I was thinking about that today and thought that I should try to put that into a F# React Native app (seethis blog post for an introduction).
So the solver code is this:
Sudoku on React Native
It turned out porting this code to React Native was pretty easy. I just copied the F# React Native demo app , added my solver code and created a React View with the data points and got this:
You can find the full source code at https://github.com/forki/SudokuApp .
Sudoku in the browser
As a the next step I took the same code and ported it to a React web app that runs in the browser:
You can find the full source code at https://github.com/forki/react-sudoku .
Sudoku on electron
In order to come full circle I tried to put the Sudoku solver into a React app on the Electron shell . This gives me a cross-platform desktop app:
You can find the full source code at https://github.com/forki/sudoku-electron .
The same code is now running
- as Console App on .NET,
- as React Native app on Android and iOS,
- in the browser,
- and with Electron as Desktop app on all operating systems.