Skip to content

Instantly share code, notes, and snippets.

@erickwize
Created March 9, 2021 00:04
Show Gist options
  • Save erickwize/21354277056b689a04752132b417f3a4 to your computer and use it in GitHub Desktop.
Save erickwize/21354277056b689a04752132b417f3a4 to your computer and use it in GitHub Desktop.
Mini-Challenge 4: State Management

Mini-Challenge 4: State Management

The Challenge

  1. Create the Provider for the Global Context.
  2. Consume the Global Context inside the components that require it: Remember the hook useContext? It's time to make use of it!
  3. Create test cases for your Global Context and for the components that consume it.

Note: Remember to apply TDD as much as you can.

Acceptance Criteria

  • The search term is stored and retrieved from the Global Context correctly.
  • The appearance theme is stored on the Global Context and applied correctly to the App UI.
  • useReducer hook is implemented correctly to manage the Global State.

Bonus Points

  • Testing coverage is above 70%. (Please include a screenshot of the code coverage report in your PR description).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment