WhoBuilt

Controlled Mobile Rollout With React Native And Feature Flags

Oct 22, 2020· 19 min· 692 views·Watch on YouTube

Speaker

At React Native EU 2020, Talia Nassi, a developer advocate at Split, explains how React Native teams can use feature flags for controlled mobile rollouts.

Why CodePush is not enough

Nassi uses Debbie’s story to show the risks of shipping a mobile feature that breaks the app. CodePush can update some JavaScript changes, but it cannot fix a bug in native code such as camera access. While waiting for an app store release, the team can use a feature flag to disable the feature.

Release features gradually

Feature flags separate deploying code from making a feature available to users. Teams can first enable a feature for internal testers, then release it to a small share of users, such as 5%, and increase that share as confidence grows. They can also roll it back or use A/B tests to compare outcomes, including spending and performance across iOS and Android.

Keep flag settings available offline

Nassi addresses the concern that mobile users may lose connectivity before the app can fetch flag settings. She describes Split caching flag data on each device and refreshing it every 15 minutes, so users can get the latest cached experience offline. Local caching can also help apps load when connections are slow.

Use SplitTreatments in React Native

Nassi shows how the Split React Native SDK’s SplitTreatments component can wrap a feature such as barcode shopping. Its treatment rules determine whether a user sees the barcode experience. Teams can configure targeting in Split’s UI, for example by limiting initial access to internal users, a region, or a device type.

Find problems earlier

Nassi says gradual rollout helps teams find defects earlier, spend more time building features, and reduce the cost of fixing problems. She cites Uber’s use of feature flags and an academic paper it published to address concerns about using the approach in mobile apps.

Takeaways

  • Separate code deployment from feature release so teams can disable a feature without shipping a new build.
  • Start with internal users or a small percentage of users, then increase exposure as confidence grows.
  • Check which bugs can be fixed with a JavaScript update and which require an app store release.
  • Cache feature flag settings locally so app behavior remains available when connectivity drops.
  • Use targeting rules to control access by user group, region, or device type.

Mentioned in this talk

Search inside this talk

What was claimed 8

  • role at
    Talia Nassi is developer advocate at Split
    “I'm a developer advocate at Split.”
    YouTube
    Unverified1 source· Talk
  • feature
    CodePush: dynamically update the experience in a React Native app
    dynamically update the experience in a React Native app
    “CodePush is a tool you can use to dynamically update the experience in your React Native app.”
    YouTube
    Unverified1 source· Talk
  • feature
    feature flags: Separate code deployment from feature release and turn features on or off without a lengthy release process
    “A feature flag lets you separate code deployment from feature release.”
    YouTube
    Unverified1 source· Talk
  • feature
    Controlled rollouts: Gradually release features to groups of users and roll them back if needed
    “With controlled rollouts, you can release new features gradually.”
    YouTube
    Unverified1 source· Talk
  • feature
    Split: Cache feature flag data and refresh it every 15 minutes for use when connectivity is unavailable
    “By automatically caching feature flags and pulling updates for them every 15 minutes”
    YouTube
    Unverified1 source· Talk
  • metric
    Uber: Thousands of feature flags in its iOS codebase
    “Uber has thousands of feature flags in their iOS codebase”
    YouTube
    Unverified1 source· Talk
  • uses
    thousands of feature flags in its iOS codebase
    “Uber has thousands of feature flags in their iOS codebase”
    YouTube
    Unverified1 source· Talk
  • feature
    React Native: provides a component that returns treatments based on the names prop
    provides a component that returns treatments based on the names prop
    “she adds the SplitTreatments component, which is provided in the Split RN SDK.”
    YouTube
    Unverified1 source· Talk

Related talks