Use React hooks inside an MDX story in Storybook
Estimated 1 minute readย ยทย Thursday, 13 January 2022
<Story name="With hooks">
{() => {
const [count, setCount] = useState(0);
return (
<button onClick={() => setCount(count + 1)}>
Clicked {count} time(s)
</button>
);
}}
</Story>