Currently, I'm researching my next project, a book about creating software MVPs and one big need that pops up rather often is the ability to build cross-platform applications with one code-base.
While I think that React-Native is the way to go, it's always a good idea to look at what other solutions are out there. Flutter, for example, got much hype lately — a framework to build cross-platform apps with the Dart programming language.
Today I want to look at another promising approach: Revery
"Revery is kind of like super-fast, native Electron - with a bundled React, Redux, and a fast build system - all ready to go!"
Revery is a (currently experimental) cross-platform desktop app framework build with the Reason programming language.
Revery doesn't render native widgets, but its own widgets with the help of GPU accelerated rendering.
While Electron is undoubtedly the fastest way to build desktop apps at the moment, it comes at the cost of its size and with a few performance issues. Electron ships with a whole browser to allow developers to leverage the web-ecosystem.
Frameworks like React-Native have the approach of using native widgets, which leads to better performance and smaller applications, which is a massive win on mobile devices, but it also leads to inconsistencies, because iOS and Android don't offer 100% overlap in native widgets or even their behavior.
So why not Flutter?
I think the main reason is that Flutter currently focuses on mobile development.
Revery has mobile platforms as targets on its roadmap, but it focuses on the desktop first.
Let's see how we get the example project of Revery up and running.
$ npm install -g esy
Next, we need to clone the example project with git from Github and open the project.
$ git clone email@example.com:revery-ui/revery-quick-start.git $ cd revery-quick-start
Now we need to install the dependencies and compile everything with esy.
$ esy install $ esy build
The first build will take some time, but after that, we can run the compiled binary directly.
Which opens the app and shows a window with text and button.
App.re we find the source and can change it as we wish.
The fact that Revery borrows concepts from React makes it especially interesting for me.