Skip to content

Instantly share code, notes, and snippets.

@jparciga
Last active February 10, 2021 05:08
Show Gist options
  • Save jparciga/b2838f1b8abe223e2aba7cbb879bc2fb to your computer and use it in GitHub Desktop.
Save jparciga/b2838f1b8abe223e2aba7cbb879bc2fb 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