by Keyframe · 9y ago · 0 comments
I have a need for an app that is mostly word-processing oriented in nature with some interactive graphing and drawing, some displaying, creating and drawing on top of PDFs too. I'm looking for easiest path to create something crossplatform AND performant (and possibly easy on the battery).
I also thew the logic/state/HTTPclient part of the app behind a crappy Electron "desktop" UI the other day for giggles. Wasn't hard, took about half a day. No design or releasable GUI in that amount of time, but you can click buttons and fill in values and stuff happens, using the same code as all those other platforms do (or will, in some cases—it's ongoing). So you can't share the GUI, but you can share pretty much everything else.
> (and possibly easy on the battery).
React Native's not too bad, compared to other cross-platform whatevers that have come before it. Electron kind of almost flirts with being easy on the battery at its very best, but hell, no-one else seems to care about that so why should you?
> creating and drawing on top of PDFs too
Oh god. Have fun with Android and PDF. Yeesh.
[EDIT] I should add that you can always add native code to React Native projects for parts that need it. Not sure about Electron, but... maybe?
There are some desktop bindings available, but they're relatively experimental:
https://github.com/ptmt/react-native-macos
https://github.com/Microsoft/react-native-windows
https://github.com/jamrizzi/react-gtk (no code yet, just intent to develop)
> both a desktop (Linux/MacOS/Windows) and mobile (tablet and phone, android and IOS) application from same codebase... word-processing oriented in nature with some interactive graphing and drawing, some displaying, creating and drawing on top of PDFs
... definitely doesn't fit that description. At that point, your choices are JS with RN, React and Electron or C++. For custom graphics rendering and editing, JS would be a very odd choice.