Put in order · JavaScript and React course · Module 4: Context API and useReducer

Provider Nesting Order

Arrange the Provider nesting in a typical React application - from outermost:

Items to put in order

  • AuthProvider - user authentication
  • ThemeProvider - visual theme (available everywhere)
  • Application components (consume all contexts)
  • NotificationProvider - notifications (requires data)
  • DataProvider - application data (requires auth)

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