```js
// /my-addon/register.js

import React from 'react';

import { useStorybookState } from '@storybook/api';

export const Panel = () => {
  const state = useStorybookState();

  return <div>do something with storybook's state</div>;
};
```