I’m getting weird behavior from Utils.isMobile. It seems to always evaluate to true no matter what device I choose.
Is anyone else experiencing this?
(Edited) Answer:Utils.isMobile is a function, so you must call it like this: Utils.isMobile()
Utils.isMobile is a function, so you should use it like this: Utils.isMobile()
Okay, that was easy—haha. The simplest things are sometimes the trickiest to spot. Thanks Koen!
Follow up question: Utils.isMobile() evaluates to true on my phone, but not on a simulated mobile device in Framer Studio. Is that expected behavior Koen? I appreciate your help!
Andy, yes it is.
I see, thanks Fran. I want to have distinct behavior on mobile devices, simulated or not. One hacky way of doing it is checking Framer.Device.deviceType, so I’ll use that for now.
Yep. But I can see how that be confusing.