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

import { STORY_CHANGED } from '@storybook/core-events';
export const Panel = () => {
  const emit = useChannel({
    STORY_CHANGED: (...args) => console.log(...args),
  });

  return (
    <button onClick={() => emit('my-event-type', { some: 'data' })}>
      clicking this will emit an event
    </button>
  );
};
```