From a8216e79385177d0abc283b4edd3c3709408447a Mon Sep 17 00:00:00 2001 From: Mike S Date: Wed, 23 Aug 2017 12:24:22 -0400 Subject: [PATCH] docs(knobs) Add caveat about date defaultValue Related to #804 --- addons/knobs/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/knobs/README.md b/addons/knobs/README.md index 4f2a69ccceef..4c3788d9d0ae 100644 --- a/addons/knobs/README.md +++ b/addons/knobs/README.md @@ -229,6 +229,8 @@ const defaultValue = new Date('Jan 20 2017'); const value = date(label, defaultValue); ``` +> Note: the default value must not change - e.g., do not do `date('Label', new Date())` or `date('Label')` + ### withKnobs vs withKnobsOptions If you feel like this addon is not performing well enough there is an option to use `withKnobsOptions` instead of `withKnobs`.