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
I'm using nextjs and when I click the switch this is the error I get:
Here's my code: <label> <span>Switch with default style</span> <Switch onChange={handleChange(1)} checked={isActive(1)} /> </label>
The text was updated successfully, but these errors were encountered:
It looks like you're invoking the handleChange function which means you're passing whatever that function returns to the Switch component. You should be passing the function itself.
I'm using nextjs and when I click the switch this is the error I get:
Here's my code:
<label> <span>Switch with default style</span> <Switch onChange={handleChange(1)} checked={isActive(1)} /> </label>
The text was updated successfully, but these errors were encountered: