I'm trying to get this module: https://github.com/marcj/css-element-queries embedded in a ReactJS app that I have.
Unfortunately if I run:
import {ElementQueries,ResizeSensor} from 'css-element-queries';
at the top of my app, nothing happens. Any ideas?
Update
To clarify what I mean. The library doesn't appear to get triggered when the browser loads as it's supposed to. However if I load the console and type ElementQueries.init();
it works.
If I put that in the React component though I get the following error:
_cssElementQueries.ElementQueries.init is not a function
have you tried: import 'css-element-queries';
And then access ElementQueries
or ResizeSensor
as a global?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.