uber / uber/RIBs

question about router deactivation order

Open
#589 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
7.9k
Forks
914
PR merge metrics
No merged PRs in 30d

Description

This is a question regarding the reason why Routers first deactivate themselves before dispatching the deactivation to their children and perhaps a proposal to reverse that order.

For Android, the code is in this neighborhood, where dispatchDetach is called before detachChild (which will eventually call dispatchDetach on the child as well).

For iOS similar behavior can be observed here in the deinit block of Routers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Router.kt around lines 192-196 and ios/RIBs/Classes/Router.swift around lines 215-219. Compare how dispatchDetach and child detachment are ordered on both platforms, then determine the intended lifecycle contract and whether reversing the order is safe. Done means the ordering question has a documented decision and an agreed implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, swift
Domain
mobile-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.