// the find
benoitvallon/react-native-nw-react-calculator
Mobile, desktop and website Apps with the same code
A 2015-era proof-of-concept showing how to share business logic across iOS, Android, Electron, NW.js, and web from a single React/React Native codebase. The core idea — separate render functions selected by file extension, with shared Flux stores — was genuinely interesting before React Native Web and Expo existed. It's a calculator app, so the domain is trivial; the architecture pattern is the whole point.
The file-extension-based render splitting (ScreenRender.ios.js, ScreenRender.android.js, ScreenRender.js) is a clean way to swap platform-specific UI while keeping all logic in a shared base class. Flux architecture is 100% shared across targets, so the business logic is tested once and runs everywhere. The component structure (Base + Render separation) makes the platform boundary explicit rather than hiding it behind runtime checks.
Dead since 2021 — React Native has moved from 0.x to 0.77 since this was last touched, and none of the native setup instructions work anymore. The whole premise is obsoleted by React Native Web and Expo, which solve cross-platform sharing without the manual file-extension juggling this repo requires. Grunt as the build tool and the NW.js desktop target are both zombies at this point. Stars are from 2016 when this was novel; the fork count reflects people trying to make it work, not people shipping with it.