storybook/preact: clears out and rerenders story on each knob change
See original GitHub issueIs your feature request related to a problem? Please describe.
For some components it’s important to test changes in reaction to knob changes and not just rendering from the “clean slate”. For instance, a Preact component’s reaction to a prop change or a context change could cause performance problems which would otherwise be invisible if the component is rerendered from scratch. @storybook/react
does not have this problem. But @storybook/preact
forces the complete rerender. See this code.
Describe the solution you’d like Ideally, the normal Preact rendering would be used when knobs change w/o first clearing and unmounting of the component first.
Are you able to assist bring the feature to reality? May be. It looks like the change would otherwise be very simple.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Tried it. Seems to work as expected now. Thanks a lot!
@dvoytenko thank you! great job fixing it! 🙏