1.2.2 • Published 5 years ago
@asayerio/tracker-cssrules v1.2.2
Asayer Tracker CSSRules plugin
Tracker plugin to support dynamic style (insertRule and deleteRule). Useful for the applications using the styled-components.
Installation
npm i @asayerio/tracker-cssrulesUsage
Initialize the @asayerio/tracker package as usual and use css rules as a plugin.
Then start the tracker.
Plugin replaces original insertRule and deleteRule to keep track of their calls.
Thus, you should initialize plugin via .use before any call of these functions (before any render of your Styled Components).
import Tracker from '@asayerio/tracker';
import trackerCSSRules from '@asayerio/tracker-cssrules';
const tracker = new Tracker({
projectID: PROJECT_ID,
});
tracker.use(trackerCSSRules());
tracker.start();