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
The Button is not rendered at all, and no errors show in the console.
I suspect this is a braces issue; if I pass the onClick prop but supply it a string instead, the component renders and I get a warning in the console that onClick expects a function.
The text was updated successfully, but these errors were encountered:
If I try to pass an onClick to a custom component, the component is not rendered and no error is shown in the console.
Here's how I'm defining my custom component:
if I pass this markdown:
<Button className='primary' >foo</Button>
it renders the custom Button component as expected.
But if I pass this:
<Button className='primary' onClick={() => alert('ok')} >foo</Button>
The Button is not rendered at all, and no errors show in the console.
I suspect this is a braces issue; if I pass the
onClick
prop but supply it a string instead, the component renders and I get a warning in the console that onClick expects a function.The text was updated successfully, but these errors were encountered: