@solid-primitives/rootless
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
// src/index.ts | ||
@@ -34,3 +36,3 @@ import { asArray, access } from "@solid-primitives/utils"; | ||
queueMicrotask(() => { | ||
if (listeners) | ||
if (listeners || !dispose) | ||
return; | ||
@@ -37,0 +39,0 @@ dispose(); |
{ | ||
"name": "@solid-primitives/rootless", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A collection of helpers that aim to simplify using reactive primitives outside of reactive roots, and managing disposal of reactive roots.", | ||
@@ -42,12 +42,12 @@ "author": "Damian Tarnawski @thetarnav <gthetarnav@gmail.com>", | ||
"dependencies": { | ||
"@solid-primitives/utils": "^1.0.0" | ||
"@solid-primitives/utils": "^2.2.1" | ||
}, | ||
"devDependencies": { | ||
"jsdom": "^19.0.0", | ||
"prettier": "^2.5.1", | ||
"solid-register": "^0.1.5", | ||
"tslib": "^2.3.1", | ||
"tsup": "^5.11.11", | ||
"typescript": "^4.5.4", | ||
"uvu": "^0.5.2" | ||
"prettier": "^2.7.1", | ||
"solid-register": "^0.2.5", | ||
"tslib": "^2.4.0", | ||
"tsup": "^6.1.3", | ||
"typescript": "^4.7.4", | ||
"uvu": "^0.5.6" | ||
}, | ||
@@ -57,2 +57,2 @@ "peerDependencies": { | ||
} | ||
} | ||
} |
@@ -7,3 +7,3 @@ <p> | ||
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg?style=for-the-badge)](https://lerna.js.org/) | ||
[![turborepo](https://img.shields.io/badge/built%20with-turborepo-cc00ff.svg?style=for-the-badge&logo=turborepo)](https://turborepo.org/) | ||
[![size](https://img.shields.io/bundlephobia/minzip/@solid-primitives/rootless?style=for-the-badge&label=size)](https://bundlephobia.com/package/@solid-primitives/rootless) | ||
@@ -136,3 +136,5 @@ [![version](https://img.shields.io/npm/v/@solid-primitives/rootless?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/rootless) | ||
```ts | ||
const useState = createSharedScope(() => { | ||
import { createSharedRoot } from "@solid-primitives/rootless"; | ||
const useState = createSharedRoot(() => { | ||
return createMemo(() => {...}) | ||
@@ -157,2 +159,6 @@ }); | ||
### Demo | ||
Usage of combining `createSharedRoot` with `createMousePosition`: https://codesandbox.io/s/shared-root-demo-fjl1l9?file=/index.tsx | ||
## Changelog | ||
@@ -159,0 +165,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15379
195
180
+ Added@solid-primitives/utils@2.2.1(transitive)
- Removed@solid-primitives/utils@1.5.2(transitive)