```js
// /my-addon/manager.js
import React from 'react';
import { useAddonState } from '@storybook/api';
export const Panel = () => {
const [state, setState] = useAddonState('my/addon-id', 'initial state');
return ;
};
export const Tool = () => {
const [state, setState] = useAddonState('my/addon-id', 'initial state');
return ;
};
```