I have a react native app that is released on the PlayStore. Now I want to create a paid app with more features.
The paid app would be the free app plus a couple of other features. I use vanilla React Native.
How shoul I structure my repository and my workflow so that in the end I wouldn't have to maintain two different apps.
I'm not familiar with react native, but in general. There are a few ways to handle this.
If you want to maintain one code base you can create some kind of paidVersion flag in your code. If the flag is false, certain buttons that allow the user to use paid features are simply hidden. If the flag is true, the buttons that allow the user to use paid features are visible.
This is probably the easiest thing to do.
Software companies oftentimes find themselves in a position where they maintain a free open source version of their software, and a paid closed source version of the same software with some extra features. To minimize the effort of maintaining the two products which are basically the same, they do the following.
Now there are three cases to consider when you change the product.
Make the free version of you product support plugins. The paid version of the product is simply the free version with a plugin bundled with it.
The right method to use primarily depends on what the nature of what you are building. If the product you are building is very complicated (like an IDE) and may have multiple optional paid features, then you may want to use some kind of plugin framework.
If the product is simple and you have no intention of sharing the source code of either the free or paid version, then using a paidVersion flag is the best route.
If you want to share the source code of the free product, then you should probably use the two branches strategy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With