Open
Description
Using ES6 import
is needed to run as a function to work.
Ex:
import React from 'react';
import isMobile from 'ismobilejs';
const Navbar = () => {
const navbarColllapseTarget = isMobile().phone ? '#nav-search-user' : '';
return (...);
}
export default Navbar;
T
4EDD
his works: isMobile().phone
This does not: isMobile.phone
In documentation is specified to use isMobile
as an Object. In a previous project, I used as an Object.
Maybe I'm doing something wrong, I don't know.
Metadata
Metadata
Assignees
Labels
No labels