Click in order · JavaScript and React course · Module 15: Patterns and Architecture

The Path of a Flag from State to Screen

Click in order the stages a flag change goes through in an app with FeatureFlagProvider:

Items to click

  • useFeatureFlag reads the flag from the context.
  • The screen shows the new or the old version.
  • A checkbox click changes the flags state in App.
  • FeatureFlagProvider gets the new flags and passes them through the context.
  • Feature picks children or fallback.

You can check the correct answer by solving this task in the CodeWorlds game.