storybook/docs/_snippets/args-usage-with-addons.md
2024-06-13 17:53:08 +01:00

343 B

import { useArgs } from '@storybook/manager-api';

const [args, updateArgs, resetArgs] = useArgs();

// To update one or more args:
updateArgs({ key: 'value' });

// To reset one (or more) args:
resetArgs((argNames: ['key']));

// To reset all args
resetArgs();