Reduce API Fragmentation Across Platforms with Unitools

May 6, 2024

Reduce API Fragmentation Across Platforms with Unitools

In this blog, we take a look at how Unitools offers a comprehensive solution to cross-platform development challenges.

Author

Tailor Ankitbhai Gopalbhai
Tailor Ankitbhai GopalbhaiSenior Software Engineer - I


Problem with Code Sharing

In the cross-platform development, sharing code for essential functionalities like navigation and image handling across frameworks such as Next.js, Expo, and React Native presents several challenges:

  1. Fragmentation of APIs:
    • Each framework offers its own set of APIs for components and hooks, leading to fragmentation in code sharing.
    • Developers often face the dilemma of choosing between platform-specific APIs, resulting in code that is tightly coupled to a particular framework.
  2. Limited Options:
    • While numerous libraries exist for universal components, options for core functionalities like navigation and image handling are relatively less.
    • This scarcity makes it challenging to find robust solutions that work seamlessly across platforms, forcing developers to either compromise on functionality or invest time in building custom solutions.


Finding the Solution to the Problem

To address these challenge, we had two key solutions:

  1. Platform-based Solution:
    • Leveraging platform-specific logic to handle navigation and image handling. For instance, returning Next links for web platforms and Expo/React Navigation links for mobile platforms.
    • This approach prioritizes compatibility with the native features and behaviors of each platform, ensuring a smooth user experience across devices.
  2. Framework-based Solution:
    • Developing a unified API within a base library that abstracts away platform-specific details.
    • Creating platform-specific libraries that unify props for each framework, allowing developers to seamlessly switch between Next.js, Expo, and React Native without sacrificing functionality.
    • Base library is aliased with framework-specific libraries in the user's project, ensuring ease of use and compatibility.


Introducing Unitools

Unitools is a suite of tools designed to simplify code sharing among Next.js, Expo, and React Native projects. It is an essential tool in today's cross-platform development landscape, especially with the increasing shift towards universal app development. Unitools offers a unified API for managing images, links, and route navigation hooks across all these platforms.


Our Approach

A framework-based solution

Our approach focuses on a framework-based solution, emphasizing the following principles:

  • Unified API: By centralizing functionality within a base library, Unitools abstracts away platform-specific details, making it easier for developers to write code that works across different frameworks.
  • Platform-specific Libraries: To ensure compatibility and optimize performance, Unitools offers platform-specific libraries that unify props for each framework. This approach allows developers to leverage the native features and behaviors of each platform while maintaining a consistent API.
  • Alias Integration: Unitools seamlessly integrates with developers' projects through aliasing, making it easy to incorporate the base library and platform-specific extensions without disrupting existing workflows.


Why Not the Platform-First Approach?

While a platform-first approach may seem intuitive, it often leads to fragmented code and limited flexibility. By prioritizing a framework-based solution, Unitools ensures compatibility with future framework-specific optimizations and features, safeguarding against the ever-changing landscape of cross-platform development.


Why Not Solito?

During our exploration of solutions, we identified a need for seamless integration with Expo Web. Solito, a platform-based solution, mainly returns NextLink on web platforms. This prompted us to create our own framework-based solution.


What’s Included?

Each package contains three libraries:

  1. Base package which exports the interface
  2. Expo package
  3. Next.js package

Below are the packages we have created so far:

  • Link - A unified API for expo and next link
  • Image -A unified API for expo and next image
  • Router - A unified API for expo and next router

Explore more about Unitools 🔗

Hire Us Form


Parting Thoughts

Unitools provides a comprehensive solution to cross-platform development challenges. It offers a unified toolkit for sharing code across Next.js, Expo, and React Native projects. With a framework-based approach that prioritizes compatibility and flexibility, Unitools enables seamless code sharing and boosts developer productivity in the ever-changing world of app development.

Subscribe to Our Newsletter

More from the engineering frontline.

Dive deep into our research and insights on design, development, and the impact of various trends to businesses.
Insight
What a PHP-to-NestJS Banking Migration Taught Us About Architecture, Security, and Trust
Sep 8, 2026

What a PHP-to-NestJS Banking Migration Taught Us About Architecture, Security, and Trust

This blog explores the architecture, security, performance, and documentation lessons from migrating a legacy PHP/Laravel banking platform to NestJS.

Insight
Building Production-Grade Video Thumbnail Scrubbing in the Browser: HLS, Frame Extraction, Caching, and Performance Trade-offs
Sep 7, 2026

Building Production-Grade Video Thumbnail Scrubbing in the Browser: HLS, Frame Extraction, Caching, and Performance Trade-offs

This blog explains how to build responsive video thumbnail scrubbing in the browser for local files and HLS streams, covering frame extraction, caching, and performance trade-offs.

Insight
The Agent Can See Your App. How Often Can It Look?
Sep 4, 2026

The Agent Can See Your App. How Often Can It Look?

AI coding agents can now interact with mobile apps, but their effectiveness depends on iteration speed. This blog explores how React Native architecture influences feedback loops and AI-driven developer productivity.

Insight
Building Interactive Cards from Design JSON Without Killing Your Feed: Overlays, Video, Mute/Unmute, and Lag-Free Lists
Sep 1, 2026

Building Interactive Cards from Design JSON Without Killing Your Feed: Overlays, Video, Mute/Unmute, and Lag-Free Lists

Learn how to turn design JSON into interactive, video-enabled cards using overlays, smart media controls, caching, and virtualization without slowing down high-cardinality feeds.

Insight
The Bug That Doesn't Show Up in Code Review: Why Your Flutter Web App Reloads on Safari
Aug 19, 2026

The Bug That Doesn't Show Up in Code Review: Why Your Flutter Web App Reloads on Safari

A real-world look at how oversized images can trigger Safari reloads and iOS crashes in Flutter apps and how smarter image decoding prevents them.

Insight
From Prompting to Process: What Changed When Flutter Shipped Agent Skills
Aug 19, 2026

From Prompting to Process: What Changed When Flutter Shipped Agent Skills

This blog explores how Flutter Agent Skills improve AI-assisted development by combining official framework workflows with project-specific guidance for more consistent development.

Insight
Why Everything Your AI Builds Looks the Same
Aug 19, 2026

Why Everything Your AI Builds Looks the Same

This blog explores why AI-generated interfaces often look alike and explains how design systems, product context, and reusable engineering practices help teams build distinctive, scalable

The Right Conversation Can

Save You Six Months.

Book a call