Composables
together with
Android Developer Careers

State of Compose 2023

Even though the foundational APIs are great to build modern UI with, there are a few things that don't feel quite right, such as Navigation. I have spent many hours reviewing different libraries and APIs to make sure I am using the right ones, and I am still not quite such which one to pick.

Because of this I made this survey to get a better understanding of the Compose ecosystem and raise awareness of the different APIs available to developers, along with the community resources that people use.

Here are the results of a survey asking 165 participants about their Compose API knowledge and usage.

This survey was heavily influenced by the State of Javascript survey. Special thanks to Sacha Greif for being cool with using the title.

Enjoy!

– Alex Styl (@alexstyl )

Compose and APIs awareness

This section asked participants about their knowledge of the Compose APIs.

State APIs

Which object usually holds your state in your Compose app?

What pain points did you face while managing state in your Compose app?

The pain points in managing state in Compose apps can be summarized into several key themes:
Summarized by ChatGPT 4
  • State Management Complexity: Difficulties with deep state hoisting, managing bloated state functions, and handling state objects containing multiple forms and values.
  • UI Component Issues: Problems with TextField stability, recomposition causing performance issues, and specific concerns about managing lists and one-shot events like toasts or navigation.
  • Recomposition Challenges: Issues around unnecessary recompositions, avoiding recomposition loops, and ensuring stability and correct updating during recomposition.
  • Architectural Concerns: Finding the right balance for hoisting state, separating UI layer and ViewModel, and dealing with process death gracefully.
  • Tooling and Framework Limitations: Struggles with integrating navigation libraries, visualizing composition dependencies, and accommodating single events or managing state in multiplatform environments.
  • Specific Technical Issues: Such as managing mutable state lists without .map functions, customizing rememberSaveable for non-primitive types, and ensuring data consistency with flows and state flows.

SideEffects

What pain points did you face with the current Side Effects Compose APIs?

Summarized by ChatGPT 4
The pain points related to using side effects in Jetpack Compose can be summarized into several key themes:
  • Complexity and Mental Model: Difficult to choose the correct side effect for specific use cases.
  • Execution Timing Issues: Challenges with LaunchedEffect timing and missed values when collecting from shared flows.
  • Caveats and Hackiness: Feels hacky and comes with caveats that require awareness.
  • Documentation and Clarity: Documentation is unclear, making it hard to understand different side effects.
  • Remembering Usage: Difficulty remembering when to use specific side effects.
  • Loading Data in Background: Uncertainty about which side effect is best for background data loading.
  • Integration with Animations: Issues when combining side effects with long animations.
  • Choosing the Right Side Effect: Confusion about selecting the appropriate side effect for various scenarios.
  • Previews and Derived State: Challenges using previews and understanding the derivedStateOf() API in complex cases.
  • Lifecycle Events: Questions about equivalents to lifecycle callbacks in Composables.

Animation Effects

What pain points did you face with the current Animation Effect APIs?

Summarized by ChatGPT 4
  • Lag: Experiences of lag in animations.
  • AnimatedContent Issues: Compile time errors from AnimatedContent and animateContentSize without clear explanations.
  • AnimationSpec Complexity: Challenges with understanding or utilizing animationspec.
  • Learning Resources: A need for quick cheat-sheets and official examples beyond trivial use cases.
  • API Limitations: Difficulties animating objects without defined sizes or simultaneously.
  • Initial Learning Curve: The API is complex and challenging for beginners.
  • Control and Customization: Issues controlling the direction of animations or customizing AnimatedVisibility.
  • Boilerplate for Sequencing: Excessive boilerplate required to animate sequences or based on state.
  • Shared Element Transitions: Mentioned as a point of interest or concern without further detail.
  • Font Animations: Challenges related to animating fonts.
  • Visibility and Size Animations: Desire for simpler ways to animate visibility and size, especially with nullable values.
  • Performance Issues: Dropped frames and performance concerns.
  • Positioning for Animation: Reliance on onGloballyPositioned for animation coordinates leads to re-composition.
  • API Selection for Performance: Difficulty choosing the most performant animation API from the many available.
  • Motion and Transition Limitations: Issues with motion and lack of native screen transition animations.
  • Complexity Beyond Basics: Challenges with implementing complex or non-trivial animations.
  • animateContentSize() Issues: Specific problems with animateContentSize() function.

Libraries and frameworks

State Handling & Management Frameworks

What other state management frameworks are you familiar with?

People said:
  • PreCompose
  • Mavericks from AirBNB
  • KOIN,Vyoser,kmp-viewmodel
  • I have my wrapper around jetpack nav, and I avoid AAC-VM. I'm checking Voyager and decompose.
  • orbit-mvi
  • Voyager
  • Interactor provided by https://github.com/outsidesource/OSKit-KMP
  • Tlaster/PreCompose
  • These state management frameworks brings lots of extra stuff that is often not required. We ended up creating our own approach which is Multiplatform friendly

Navigation

What are your pain points with handling navigation in Compose?

Summarized by ChatGPT 4
  • Type Safety and Argument Handling: Challenges with non-type-safe routes, difficulty in passing data, especially complex and non-primitive, between destinations. A strong desire exists for type-safe arguments.
  • Dependency on Third-Party Libraries: A need to use third-party libraries for type safety and flexibility, despite a preference to avoid them.
  • API Limitations and Verbosity: Issues with string-dependent APIs, cumbersome initial setup, and verbosity, especially for simple navigations or integrating navigation with business logic.
  • Complex Navigation Patterns: Handling nested navigation contexts, custom back behavior, and navigation between different graphs or within sub-graphs in modules presents complexity and boilerplate.
  • Navigation Framework Selection: Uncertainty about which navigation framework to select, with the official Jetpack Navigation considered not flexible enough for large-scale projects or multiplatform support.
  • Recomposition Concerns: High rate of recomposition when changing destinations impacts performance.
  • Shared Element Transitions and Conditional Navigation: Implementing shared transitions and conditional navigation poses challenges, including setup complexity and layout reusability.
  • Multi-Module and Multiplatform Concerns: Navigating the complexities of multi-module setups and ensuring type safety in multiplatform projects are significant challenges.
  • Legacy Migration and Interoperability: Difficulties migrating from legacy applications and ensuring compatibility with existing fragments or navigation patterns.
  • Bottom Sheets and Data Passing: Issues with BottomSheet navigation and passing complex data between screens are noted as particularly painful.
  • Maturity and Documentation: The AndroidX Navigation Compose library is perceived as not yet mature, with verbose setup and a lack of clear, visible guidance in developer documentation.

What other navigation libraries or tools are you familiar with?

People mentioned:
  • I use my own called Portal
  • PreCompose
  • link-router
  • simpleStack
  • Manual handling
  • routing-compose
  • nacotroller navgraph androidx
  • I think Circuit has navigation too.
  • I use the Navigation Component for Fragments.
  • OSKit-KMP
  • Tlaster/PreCompose
  • Decompose

Testing

This section covers what Testing frameworks people use and are familiar with:

What other testing frameworks or tools are you familiar with?

People mentioned:
  • Appium
  • Browserstack
  • Mockk
  • JUNit
  • Kotest

What is your main pain point with testing your Compose app?

People said
  • Need an emulator/device to do UI tests
  • Learning Test infrastructure
  • Too-much time spent on Ui testing
  • Tests might take too long in CI/CD
  • so much testing is overwhelming, you need so many different libraries to do it
  • Overall timing of things, but it's not tied to Compose specifically.
  • mockk is not multiplatform

Image Loading

Compose does not have a built-in image loading mechanism so developers need to rely on a third party. Here are what people use and know about:

What other image loading Compose libraries are you familiar with?

Glide, Picasso

Component Libraries

Looking for professionally crafted Jetpack Compose templates?
Checkout ComposablesUi.com

What do you think of the current UI components of Compose?

People said:

  • Pretty nice but need a little more completeness
  • Fantastic - love them
  • They're OK
  • Many differences between Material spec and impl, missing component impls
  • It's decent at least for Material 3 which I primarily use.
  • There are important missing components. For example the full screen dialog. Also, shared element transitions
  • They're pretty good, but they could make use of more customizability and some better design choices. BasicTextField2 is an example of a significant change in the right direction.
  • Most of the time, I roll my own design systems. Otherwise, the building blocks provided are quite nice.
  • Still missing important UI elements from the Material spec. Should have better support for or be more opinionated about bigger screens (new adaptive library looks like it).
  • Material 3 is fine, but the exposed drop down is too large
  • Too strict. You have to practically write your own TextField to change border width
  • Ok - a little confusing
  • In General, I love it than the usual Activity component. Its dynamic and definitely better.
  • they are getting better every month

Compose Usage

How much have you migrated to Compose?

What do you use Compose for?

Which version of Compose UI do you use?

Which dependency channel of Compose do you use?

In what context do you primarily use Compose?

In which industry sector(s) do you use Compose in?

How happy are you with the current state of Compose?

What do you think is currently missing from Compose?

Summarized by ChatGPT 4
  • Shared element transitions, OEM transitions, and declarative programming coherence.
  • A proper navigation solution; navigation is described as clunky.
  • Performance improvements and complexity issues with stability and immutability.
  • Better integration with CameraX and more component libraries beyond Material 3.
  • Improved theming, customization, and a robust ecosystem similar to XML.
  • Hot Reload, rich text editing, and a dedicated declarative navigation solution.
  • Performance guidelines, better previews, and official multiplatform support.
  • Improved state handling, paging library, text input with image support, and debugging.
  • Enhanced layout inspector, live edit support, and navigation tools.
  • API improvements for drag-drop in lazy lists, multiplatform resource management, and performance monitoring.
  • Better documentation, updated Google codelabs, and expanded tips for newcomers.

Compose Resources

What type of resources have you used to learn Compose?

Which newsletters, blogs, magazines, etc do you use to stay up to date with Compose?

Which Compose or Android content creators do you read/listen on Youtube, Twitch, Twitter, etc?

Who do you read, follow, or just want to highlight in the Android or Compose community?

About this survey

Where did you hear this survey from?

Demographics

There were a total of 165 participants taking this survey. This section is about the information of the participants.

How old are you?

How many years of experience do you have?

What is your company size?

What is your annual income?

What is your country or region?

What is your gender?

What is your race and ethnicity?

Would you like to participate in the State of Compose 2024?

;