Skip to content

Commit 1cd486d

Browse files
committed
mark createSharedRoot calls as PURE
1 parent 601c1f6 commit 1cd486d

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

packages/resize-observer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solid-primitives/resize-observer",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Reactive primitives for observing resizing of HTML elements.",
55
"author": "Moshe Udimar",
66
"contributors": [

packages/resize-observer/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ export function createWindowSize(): {
137137
* console.log(size.width, size.height)
138138
* })
139139
*/
140-
export const useWindowSize: typeof createWindowSize = createSharedRoot(createWindowSize);
140+
export const useWindowSize: typeof createWindowSize =
141+
/*#__PURE__*/ createSharedRoot(createWindowSize);
141142

142143
/**
143144
* @param target html element

packages/scroll/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solid-primitives/scroll",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Reactive primitives to react to element/window scrolling.",
55
"author": "David Di Biase <dave.dibiase@gmail.com>",
66
"contributors": [

packages/scroll/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,6 @@ export function createScrollPosition(
8383
* console.log(scroll.x, scroll.y)
8484
* })
8585
*/
86-
export const useWindowScrollPosition = createSharedRoot(() => createScrollPosition(window));
86+
export const useWindowScrollPosition = /*#__PURE__*/ createSharedRoot(() =>
87+
createScrollPosition(window)
88+
);

packages/visibility-observer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solid-primitives/visibility-observer",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Primitive to track page visibility",
55
"author": "David Di Biase",
66
"contributors": [

packages/visibility-observer/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ export const createPageVisibility = (): Accessor<boolean> => {
3535
* })
3636
* ```
3737
*/
38-
export const usePageVisibility = createSharedRoot(createPageVisibility);
38+
export const usePageVisibility = /*#__PURE__*/ createSharedRoot(createPageVisibility);

0 commit comments

Comments
 (0)