@storybook/react#forceReRender JavaScript Examples

The following examples show how to use @storybook/react#forceReRender. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: react.js    From cypress-storybook with MIT License 5 votes vote down vote up
window.__setCurrentStory = function (categorization, story) {
  clearCurrentStory()
  setCurrentStory(categorization, story)
  forceReRender()
}
Example #2
Source File: react.js    From cypress-storybook with MIT License 5 votes vote down vote up
window.__changeKnob = function (changedKnob) {
  changeKnob(changedKnob)

  // force story to rerender with updated knob
  forceReRender()
}