Skip to content

Unitools | Objectives | By GeekyAnts

Objectives

Unitools is a collection of tools that help you to build your projects. It is designed to be simple and easy to use. At the same time higly independent with-in itself. This means that you can use only the tools you need and leave the rest behind. Hence the first choice we made was to make it a collection of packages and not a single package.

Universal?

Unitools is a group of tooling that aims to simplify the process of code sharing between Next.js and Expo projects. It’s a required and indispensable tool in the realm of cross-platform development today with more and more apps moving towards universal app development. Unitools provides a unified API for handling images, links, font plugin and route navigation hooks across all these platforms.

Why not a single package?

The main reason is that we want to keep the tools abstract and independent. This means that you can use the tools you need and leave the rest behind. This also means that you can use the tools in any project you want and allows you to use @unitools/link package without the peer dependencies of the @unitools/image package for example.

Because of this approach you can use them in a Next.js project and a Expo project as well without any complications in managing dependencies.

Web vs Native patterns

With the introduction of React Native to the world, we have seen a lot of patterns that are used in web development being used in native development as well. This is a great thing because it allows us to use the same codebase in both worlds i.e. “The start of Universal apps”.

But as things progressed we realised the differences between the two worlds and the patterns that are used in them. For instance consider how the Link component is implemented and used in React Native as compared to web. They are both used to navigate between screens but the way they are used is different. Also if you consider the Image component, the way it is used in web is different from how it is used in React Native. The local asset source is served in web from a self hosted endpoint in web but in React Native you are required to use the require function to get the local assets.

There are a lot of fragmentation in both worlds and we want to bridge that gap. We want to provide a single source of truth for both worlds. This is where Unitools comes in and solves the problem.