Could you introduce your app in a few sentences?
LBRY is a free peer-to-peer content sharing digital marketplace where anyone can publish any kind of content including music, videos, ebooks and more. The publisher can make their content free or set a price, and anyone across the world can access that content with all proceeds going directly to the publisher as there is no middleman nor centralized authority involved.
The app is available for Android at the moment with plans to port to iOS in the future.
What made you decide to use/switch to React Native?
The LBRY app was initially implemented as a desktop app with React, packaged with Electron. At LBRY Inc, we wanted to be able to reuse as much code as possible in order to reduce the time it takes for developers to transition from the desktop to mobile codebase, and implement new features common to both desktop and mobile. React Native ended up being the logical choice since it supports both mobile platforms, makes use of native components which results in better overall performance, and we already had a React codebase to start from.
How did you transition to React Native?
We created packages for most of the shared common code for handling the redux state, the actions, reducers and selectors, as well as other utility libraries and methods which were common to both platforms. This allowed us to get the implementation up and running very quickly.
Unfortunately, we could not create common components, because the React implementation made use of web elements which React Native does not support. We solved this by building a new set of UI components tailored for mobile using React Native elements.
Have your tried other cross platform technologies before using React Native?
What has your experience been working with React Native in terms of app performance, have you noticed any impacts?
App performance has been very comparable to native apps on Android with a couple of minor hiccups.
One particular example that stands out was having to display multiple animated GIF on a screen which resulted in slow scrolling on mid- to low-end devices. I initially used the Fresco library to enable opt-in animated GIF support with the native React Native Image component, but eventually had to switch to FastImage (https://www.npmjs.com/package/react-native-fast-image), which is more performant and had animated GIF support built-in without having to include an extra dependency.
Additionally, there seems to be performance issues on low-end devices, and some mid-range devices.
How has adopting React Native affected developer productivity?
Using React Native makes it very straightforward to implement new features which will be shared between both the desktop and mobile apps. Additionally, developers have no difficulty transitioning between writing code for either platform since most of the codebase is very similar, with a few minor differences due to how React Native components differ from the React web elements.
Which tools, libraries and frameworks are part of your development process with React Native?
- Buildozer (with Python for Android) - for packaging a Python dependency with the app
- Android Studio
What resources have you used to learn React Native? Books, tutorials, courses etc. Anything you can recommend?
The React Native documentation was the most valuable resource in learning about React Native. There were also a few articles on Medium which can be find with a simple search. However, some of these articles are outdated, since newer versions of React native have been released.
What are some things that you don’t like about React Native or that need to be improved?
Better performance on, and support for low-end to some mid-range devices would be nice. There appears to be some occassional UI stuttering and unresponsiveness from time to time.
Although the documentation is pretty decent, it could be better with more details concerning certain important things. For instance, I was only able to find out about how Expo relates to React Native from third-party sites. Considering the fact that the documentation recommends using Expo, I feel like this is a bit of an oversight.
Anything else you would like to mention?
The LBRY project is open-source and you can check out how we approached achieving our goal with the mobile app here. Contributors are also welcome if you want to write code for the project.
Also, feel free to checkout the app at lbry.io/get.