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 tried to use your package in my React app and stumbled upon following:
I have an breakpoints object/map which contains keys like smlg and string values such as 36rem and 62rem
Upon mounting, the Compoment goes through several render cycles while generating the following output:
LG 62rem
992
16
_________________
LG 62rem
992
16
_________________
LG 62rem
992
16
_________________
LG 62rem
992
16
_________________
LG 62rem
992
16
_________________
LG 62rem
868
14
_________________
As you can see, toPX() returns the right result during each render, except for the very last one.
It got even more confusing, when I tried the following:
I tried to use your package in my React app and stumbled upon following:
I have an
breakpoints
object/map which contains keys likesm
lg
and string values such as36rem
and62rem
Upon mounting, the Compoment goes through several render cycles while generating the following output:
As you can see,
toPX()
returns the right result during each render, except for the very last one.It got even more confusing, when I tried the following:
which generated this output:
I ended up copying all the code of your
index.js
file directly to my project and it worked as intended.The text was updated successfully, but these errors were encountered: