Skip to content

Remove initSplitExpense, as it encourages bad practices #82711

Closed

Description

@JS00001

Coming from #82684, we have removed initSplitExpense where necessary for the changes (replacing it with useSplitExpense). However, this method is used all throughout the codebase, leading to a ton of excessive subscriptions to collections. Lets remove it

Activity

  1. self-assigned this
    on Feb 17, 2026
  2. truph01 commented on Feb 18, 2026

    @truph01
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    What is the root cause of that problem?

    • initSplitExpense establishes subscriptions imperatively and is invoked in multiple components throughout the codebase. This leads to redundant and unnecessary subscriptions, increasing complexity and potentially impacting performance.
    • The newer useSplitExpense hook provides a more idiomatic and controlled way to manage these subscriptions within React’s lifecycle, but the migration is currently incomplete.

    What changes do you think we should make in order to solve the problem?

    What alternative solutions did you explore? (Optional)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions