Making of open source: react native context menu

Making of open source: react native context menu

Posted by Stanislav Miklik | October 30, 2016 | javascript, react

This year we have decided to make our first open source project. It is context menu component for React Native. However right now we don’t want to talk about the component itself but rather talk about what have we learnt by doing it.

Motivation

Why have we decided to make it in first place? We used another library for RN context menu in our application. However it had some issues – we reported some of them, even one pull request but author haven’t so much time to solve them. Of course, he has no obligations to do so – it is open source. As we were digging deeper, it seems that the library would need big overhaul.

Therefore we have decided to remake the library from scratch – just to preserve (and extend) API so that we don’t need big changes in our application. We could make it as internal project but we were curious what does it mean to make open source project. And we wanted to become famous with a high quality library πŸ™‚

Lessons learnt

Let’s be honest – it takes more time to make open source project. You make more tests – 86% coverage against over 60% for our current project. You need to make nice documentation and dozens of examples. It took 30% more time than were our realistic estimations.

Despite our efforts we made errors. We have 10 issues right now in github but I would say only one or two were real errors – rests were some miss configurations or enhancements. But the one was really lame. Always test your library with independent clean project. It was working fine with our included examples and our application as well. However we exported also one file to NPM that had depended on development dependencies and it caused library to fail. And it took us quite long to find out.

This leads to next discovery. Report issues you find when you care for open source. I used to be reluctant to report issues to other open source projects. I was shy, maybe it could be an configuration error. Maybe it was just an improvement and I hadn’t wanted to bother. But right now we see it also from opposite (authors’) perspective. We wanted to get feedback. And that error could have been fixed sooner. Instead we had been just reading that our library is crashing in issue comments of the “original” library.

Conclusion

Was it worth? Well, we believe yes. So far we can’t say that we gained benefits from external contributions like pull requests or even external testing – so far users haven’t found any error that could affect us. But even that increases our confidence that the library works fine. AndΒ we believe we made the (open source) world a little bit better at least for 55 people that starred our project on github πŸ™‚

Add a comment

*Please complete all fields correctly

Related Blogs

Posted by miklik | 08 September 2017
Why do I need one? Every programmer has its own coding style. It is polite to honour the style of the file I am editing but when I am starting…
Posted by miklik | 24 February 2017
Recently we were invited to help others to resolve compatibility issues between IOS and Android. They have started with React Native but have developed their application only for Android. And…
Posted by miklik | 19 December 2016
What do you want for christmas? We wanted a color picker for React Native but we could not find any. Therefore we made one for you. You can find it…