Skip to content

Fix Composables which take Collections as params from being unstable #67

@Skyyo

Description

@Skyyo

There are 2 ways of fixing it:

  1. immutable collections from kotlinx.collections,which has a related issue which even further discourages from using them;
  2. generic immutable wrapper.

We will use the second approach on this project (since it's a lesser evil) until a better solution surfaces.
You can find the class you want to drop in the project in this gist
After that, track all Composables which take List, Map as a param (usually thats all we use but consider other Collections as well) and collect them using collectAsStateWithLifecycleImmutable instead of collectAsStateWithLifecycle

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions