This example shows how you can easily add a custom addon with TypeScript in an existing Storybook project.
This addon renders data on the manager side of Storybook, but what will be rendered can be influenced by the preview side of Storybook. We can easily interact with the addon within any Story.
import { useCounter } from './counter-addon';
// just use this hook in your stories like every other hook
const { add } = useCounter();
add(17);