You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a component, which exposes a prop like footer: React.ReactNode. This prop is rendered as a text control with some JSON values populated if I pass any JSX as an argument. This the first problem. The second problem is if I try to remove all the text in the control and type something of my own, then Storybook crashes and shows me this error message.
To Reproduce
Steps to reproduce the behavior:
Go to https://github.com/thesobercoder/Graphite and clone the repo
Run yarn && yarn sb
Navigate to ./apps/explorer/src/stories/GCard.stories.tsx to view the sourcecode if needed
Additional context
The project is bootstrapped with nx.
The text was updated successfully, but these errors were encountered:
thesobercoder
changed the title
ReactNode type prop crashes Storybook when trying to enter arbitrary values in the corresponding control.
ReactNode type prop crashes Storybook when trying to enter arbitrary values in the corresponding control
Jan 4, 2021
thesobercoder
changed the title
ReactNode type prop crashes Storybook when trying to enter arbitrary values in the corresponding control
Controls: ReactNode type prop crashes Storybook when trying to enter arbitrary values in the corresponding control
Jan 4, 2021
The problem is that empty value for field is changed into {}. for ReactNode type
I wrote simple wrapper for Storybook story to handle all {} objects and change them into empty string "" (empty string in most cases can't crash whole story).
Describe the bug
I have a component, which exposes a prop like
footer: React.ReactNode
. This prop is rendered as a text control with some JSON values populated if I pass any JSX as an argument. This the first problem. The second problem is if I try to remove all the text in the control and type something of my own, then Storybook crashes and shows me this error message.To Reproduce
Steps to reproduce the behavior:
https://github.com/thesobercoder/Graphite
and clone the repoyarn && yarn sb
./apps/explorer/src/stories/GCard.stories.tsx
to view the sourcecode if neededhttp://localhost:4400/?path=/story/card--with-footer
footer
control and delete the text and try to write some HTML/text.Expected behavior
The error shouldn't be thrown and there should be a better way to represent props of type
ReactNode
instead of a complex JSON.Screenshots
Code snippets
Included in the repo
https://github.com/thesobercoder/Graphite
System
Additional context
The project is bootstrapped with
nx
.The text was updated successfully, but these errors were encountered: