📄
react-states
  • react-states API
  • Introduction
  • Our journey
  • The Mental Model
  • Adopting react-states
  • Reference implementations
  • Environment interface
  • Subscriptions
  • Features
  • Writing UI components
  • Explicit states
  • State transitions
  • Transition effects
  • Feature testing
  • Files and folders
  • Patterns
  • PR review guide
  • Devtools
Powered by GitBook
On this page

Was this helpful?

Devtools

By adding the DevtoolsProvider to your the application you will get insight into the history of state changes, dispatches, side effects and also look at the definition of your transitions right from within your app.

The Devtool automatically handles server side rendering.

import * as React from 'react';
import { render } from 'react-dom';
import { DevtoolsProvider } from 'react-states/devtools';
import { App } from './App';

const rootElement = document.getElementById('root');

render(
  <DevtoolsProvider>
    <App />
  </DevtoolsProvider>,
  rootElement,
);
import { createReducer } from 'react-states'
import { useDevtools } from 'react-states/devtools';

const reducer = createReducer({});

const SomeComponent = () => {
  const someReducer = useReducer(reducer);

  useDevtools('my-thing', someReducer);
};
PreviousPR review guide

Last updated 3 years ago

Was this helpful?