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
Copy file name to clipboardExpand all lines: README.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,18 +97,17 @@ Possible values:
97
97
-`linkTag`
98
98
99
99
When you `lazyStyleTag` or `lazySingletonStyleTag` value the `style-loader` injects the styles lazily making them useable on-demand via `style.use()` / `style.unuse()`.
100
-
It is named `Reference Counter API`.
101
100
102
101
**component.js**
103
102
104
103
```js
105
104
importstylefrom'./file.css';
106
105
107
-
style.use();// = style.ref();
108
-
style.unuse();// = style.unref();
106
+
style.use();
107
+
style.unuse();
109
108
```
110
109
111
-
By convention the `Reference Counter API` should be bound to `.useable.css` and the `.css`should be loaded with basic `style-loader` usage.(similar to other file types, i.e. `.useable.less` and `.less`).
110
+
We recommend following `.lazy.css` naming convention for lazy styles and the `.css`for basic `style-loader` usage(similar to other file types, i.e. `.lazy.less` and `.less`).
Styles are not added on `import/require()`, but instead on call to `use`/`ref`. Styles are removed from page if `unuse`/`unref` is called exactly as often as `use`/`ref`.
141
+
Styles are not added on `import/require()`, but instead on call to `use`. Styles are removed from page if `unuse` is called exactly as often as `use`.
143
142
144
-
> ⚠️ Behavior is undefined when `unuse`/`unref` is called more often than `use`/`ref`. Don't do that.
143
+
> ⚠️ Behavior is undefined when `unuse` is called more often than `use`. Don't do that.
0 commit comments