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

export const Panel = () => {
  const [state, setState] = useAddonState('my/addon-id', 'initial state');

  return <button onClick={() => setState('a new value')}>the state = "{state}"</button>;
};
export const Tool = () => {
  const [state, setState] = useAddonState('my/addon-id', 'initial state');

  return <button onClick={() => setState('a new value')}>the state = "{state}"</button>;
};
```