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
While providing a callback to the setTheme function returned from the hook useTheme, the callback receives the parameter which is basically the prevState which is of type function rather than a string. But in typescript it shows that we can only receive the parameter of type string but in reality it's a function or a string. In ideal scenario it should be only string.
Please let me know if there is any missing understanding from my side 😄 Thanks in advance 👍
Version
0.3.0
What browsers are you seeing the problem on?
Firefox, Chrome
The text was updated successfully, but these errors were encountered:
What happened?
While providing a callback to the
setTheme
function returned from the hookuseTheme
, the callback receives the parameter which is basically the prevState which is of typefunction
rather than astring
. But in typescript it shows that we can only receive the parameter of typestring
but in reality it's afunction
or astring
. In ideal scenario it should be onlystring
.Please let me know if there is any missing understanding from my side 😄 Thanks in advance 👍
Version
0.3.0
What browsers are you seeing the problem on?
Firefox, Chrome
The text was updated successfully, but these errors were encountered: