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
Let’s say I have a component which accepts an optional Boolean prop:
exportconstMyComponent=({ shouldDoSomething =undefined}: {shouldDoSomething?: boolean;})=>{return(<div>{shouldDoSomething ? 'should do the thing!' : 'should not do the thing'}</div>;}
If I set up an example for this using react-view, I can’t ever set shouldDoSomething to false, with this configuration:
constpropConfig={shouldDoTheThing: {type: PropTypes.Boolean,description:
'Should do the thing or not?',value: true,}};
If I configure my component example to explicitly set shouldDoTheThing to false, react-view simply omits that prop from the code editor example (and in React Dev Tools you can see the prop is missing; setting it explicitly there works).
The text was updated successfully, but these errors were encountered:
Let’s say I have a component which accepts an optional Boolean prop:
If I set up an example for this using react-view, I can’t ever set
shouldDoSomething
to false, with this configuration:If I configure my component example to explicitly set
shouldDoTheThing
to false, react-view simply omits that prop from the code editor example (and in React Dev Tools you can see the prop is missing; setting it explicitly there works).The text was updated successfully, but these errors were encountered: