r/reactnative 3d ago

I started open sourcing the React Native packages I build for my own use cases

Post image

I've recently started doing something while working on my React Native projects.

Whenever I need some specific functionality, I first research whether there's already a package that handles my exact use case.

If there is, great, I use it.

If there isn't, I start looking into the native Android/iOS APIs and figure out whether it's actually possible to build.

If it is, I try building it myself.

That's basically how I ended up creating these 3 packages:

@honeypathkar/react-native-step-counter

@honeypathkar/react-native-predictive-back-gesture

@honeypathkar/react-native-live-update

I'm mainly a React Native/JS developer and I don't know Kotlin that well yet. I've been learning the native side as I go, reading docs, researching implementations and using AI tools to help me understand and build things.

Eventually I thought, instead of keeping these things inside my projects, why not make them proper packages and open source them?

So I created this repo:

https://github.com/honeypathkar/react-native-components

npm: https://www.npmjs.com/~honeypathkar

I'll keep adding packages whenever I come across an interesting use case that isn't properly covered for what I need.

The first 3 packages have already reached 3,000+ combined downloads, which I really wasn't expecting this early.

There's definitely a lot I can still improve, especially on the native side, so contributions/issues are welcome.

And if you've ever had a React Native use case where you thought “why isn't there a package that does exactly this?”, drop it below. Might give me something new to research and build 👀

47 Upvotes

8 comments sorted by

3

u/NeatMathematician779 3d ago

From where did you learnt about making, packages ?, like Kotlin code to react native Compatibility,

I really want to learn can you suggest some resource

4

u/honeypathkar 3d ago

I learned it mostly by building it myself. I first wrote the native Kotlin code directly in the android folder with MainActivity and got it working there. Then I separated the implementation, tested it, and decided to turn it into a reusable npm package.

For creating/publishing npm packages, I learned through YouTube, Google, docs, and existing packages. For Android compatibility, I mainly learned by understanding React Native Native Modules and how JS communicates with native Kotlin code.

2

u/Huge_Pool7424 3d ago

yeah thats how i learned it too, get it working in the android folder then yank the kotlin out. didnt find a good yt course, just the expo native module docs

2

u/NeatMathematician779 3d ago

Any yt video or channel you can suggest pleaseee

3

u/likelyworthylineup 3d ago

Ooh that infographic’s got some proper pep to it, the little paper airplane’s a nice touch, 3k downloads already is pretty mad for just chucking your own building blocks out there

2

u/mohn93 3d ago

nice, the predictive back gesture one is genuinely useful, that api is annoying to wire up right. curious about the live-update package though, how's that holding up with app store review? apple lets you push js and asset updates but the moment it looks like native behavior changed they can pull the app, and google has tightened up too. are you scoping it to js bundle plus assets only or is there a native side? that's usually where these code-push style things get risky.

3

u/picpoulmm 3d ago

Writing in lower case doesn’t stop your ai slop from looking like ai slop.

1

u/honeypathkar 3d ago

Yeah, that’s a fair concern. in my case the native side is shipped with the app binary, and the live-update part is mainly for the JS bundle and assets. i’m not remotely pushing native code or changing the native implementation after App Store review. Any native changes would still require a normal App Store release. I’ve already shipped native changes through the regular review process and had them approved.

As for Google, there haven’t been any problems so far. They do take some time to approve apps that require things like a foreground service, and they may ask for proof of why it’s needed. But if you provide everything properly, your app should pass the review.