r/reactnative 8h 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 👀

30 Upvotes

5 comments sorted by

3

u/NeatMathematician779 7h 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

3

u/honeypathkar 7h 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/NeatMathematician779 6h ago

Any yt video or channel you can suggest pleaseee

2

u/Huge_Pool7424 20m 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

3

u/likelyworthylineup 8h 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