Skip to content

Repository files navigation

Devtool for React Context and useReducer Hook

License: MITNPM DownloadNPM

Installation

Set Display names

Display name for Context API

  • set dispayName props in Provider
<MyContext.Providervalue={{a: 'hello',b: 'world'}}displayName="Context Display Name"><YourComponent/></MyContext.Provider>

or

  • assign display name in Context
MyContext.displayName="Context Display Name";

Display name for useReducer

  • reducer function name is use as displayName in debug

Settings

  • Chrome : right click on react-context-devtool icon and click on "Options"
  • Firefox : right click on react-context-devtool icon and click on "Manage Extenstion" and select "Preferences" tab
NameTypeDefaultDescription
Start DebuggingOn Extensions LoadtrueStart data capturing after extenstion is opened in dev panel (recommended)
On Page LoadfalseStart data capturing after page load
Enable DebuguseReducertrueenable/disable useReducer debug. Available only in development mode
Contexttrueenable/disable context debug

Troubleshooting

"React is not found in this page" when using NextJS

This extension requires React Developer Tools installed on your browser to work. Try to install the extension and restart the browser to fix it.

License

MIT


Cross-browser testing provided by Browserstack.

About

React context and useReducer debugging tool

Topics

Resources

Code of conduct

Stars

244 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages