Square sees increase productivity with Compose

Square helps millions of sellers run their business – from secure credit card processing to point of sale solutions to setting up a free online store. Square has been moving to declarative UI for a while but rather than continuing to build their own framework, they decided to move to Jetpack Compose, avoiding the maintenance costs and taking advantage of the improvements it brings over the Android Views system.

What they did

The Square team started building their design system in Compose, with the goal of enabling their design system team and product engineers to move faster. Because their app is already organised with a unidirectional data flow architecture, “It’s really easy for product engineers to swap in Compose one screen at a time.” While adopting Compose, they’ve seen that “sometimes it’s almost so simple you expect it to be more complicated. Things just work.

Results

“By using Compose, we can focus on things that are unique to Square and our UI infrastructure, rather than solving the broader issue of building a declarative UI framework.”

The engineering team found that Compose improved their productivity, making the code easier to reason about, organise, and write, and the Android Studio tooling saved them a lot of time.

“It’s simpler and faster to style components. Reading the code for complicated components is easier as well. It’s easier to organize code and make it readable in Compose. The layout system of Compose is conceptually simpler so it’s easier to reason about. Previews are a big time saver when building components.”

Get started

Learn more about Compose.