Making of Open Source: React Native Context Menu
Lessons learned from creating Instea's first open source project — a context menu component for React Native.
This year Instea decided to create their first open source project: a context menu component for React Native. Rather than discussing the component itself, this article explores the lessons learned through the open source development process.
Motivation
The team had been using another library for React Native context menus in their application. They encountered issues with it and submitted a pull request, but the original author lacked bandwidth to address them. After investigating further, they determined the library needed a major overhaul.
Instead of maintaining an internal fork, they decided to rebuild from scratch while preserving the API to minimize application changes. They were curious about creating a quality open source project and wanted to contribute meaningfully to the developer community.
Lessons Learned
Development Takes Longer
Creating an open source project requires significantly more effort than internal development. The team achieved 86% test coverage compared to over 60% in their standard projects. Documentation and examples added considerable time — approximately 30% more than realistic initial estimates.
Testing Is Critical
Despite their efforts, the team made mistakes. They reported approximately 10 GitHub issues, though only one or two represented actual errors; others were misconfigurations or enhancement requests. One significant mistake involved exporting a file to NPM that depended on development dependencies, causing library failures.
Always test your library with independent clean project.
The issue went undetected in their included examples and application but emerged for external users.
Report Issues Actively
The authors noted they previously hesitated reporting issues to other open source projects, worrying about configuration errors or bothering maintainers. From the author's perspective, they actively wanted feedback. The NPM dependency error could have been fixed sooner had users reported it directly rather than commenting on the original library's issues.
Conclusion
The team believes the effort was worthwhile. While they haven't received external contributions or user-discovered errors affecting their systems, the project gained 55 GitHub stars. They feel they made "the (open source) world a little bit better" through their contribution.