From e0fe7742f6a4c378e5a688dac7cd6ceca31dec9d Mon Sep 17 00:00:00 2001 From: Gytis Vinclovas Date: Tue, 4 Jul 2017 17:55:15 +0300 Subject: [PATCH] Updated addon knob readme. --- addons/knobs/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/knobs/README.md b/addons/knobs/README.md index f4d24e43eb00..b7e530db4778 100644 --- a/addons/knobs/README.md +++ b/addons/knobs/README.md @@ -229,6 +229,17 @@ const defaultValue = new Date('Jan 20 2017'); const value = date(label, defaultValue); ``` +### withKnobs vs withKnobsOptions + +If you feel like this addon is not performing well enough there is an option to use `withKnobsOptions` instead of `withKnobs`. +Usage: +``` +story.addDecorator(withKnobsOptions({ + debounce: { wait: number, leading: boolean}, // Same as lodash debounce. + timestamps: true // Doesn't emit events while user is typing. +})); +``` + ## Typescript If you are using typescript, make sure you have the type definitions installed for the following libs: