@statx/react
Advanced tools
| import { test } from 'uvu'; | ||
| test(`base API`, async () => { | ||
| // | ||
| }); | ||
| test.run(); | ||
| //# sourceMappingURL=index.test.js.map |
| {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,IAAI,CAAC,UAAU,EAAE,KAAK,IAAI,EAAE;IAC1B,EAAE;AACJ,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,GAAG,EAAE,CAAA"} |
+5
-2
@@ -1,2 +0,5 @@ | ||
| var e=require("react");exports.useStatx=r=>e.useSyncExternalStore(r.subscribe,r); | ||
| //# sourceMappingURL=index.js.map | ||
| import { useSyncExternalStore } from 'react'; | ||
| export const useStatx = (state) => { | ||
| return useSyncExternalStore(state.subscribe, state); | ||
| }; | ||
| //# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import {useSyncExternalStore} from 'react'\r\nimport type {Common, StateType} from '@statx/core'\r\n\r\nexport const useStatx = <T extends StateType>(state: Common<T>) => {\r\n return useSyncExternalStore(state.subscribe, state)\r\n}\r\n"],"names":["state","useSyncExternalStore","subscribe"],"mappings":"wCAG8CA,GACrCC,EAAoBA,qBAACD,EAAME,UAAWF"} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,OAAO,CAAA;AAG1C,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAsB,KAAgB,EAAE,EAAE;IAChE,OAAO,oBAAoB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;AACrD,CAAC,CAAA"} |
+8
-23
| { | ||
| "name": "@statx/react", | ||
| "version": "1.1.0", | ||
| "version": "1.1.4", | ||
| "private": false, | ||
@@ -27,10 +27,7 @@ "description": "Extry tiny smart statx manager", | ||
| "exports": { | ||
| "require": "./build/index.js", | ||
| "types": "./build/index.d.ts", | ||
| "default": "./build/index.module.js" | ||
| "default": "./build/index.js" | ||
| }, | ||
| "main": "./build/index.js", | ||
| "module": "./build/index.module.js", | ||
| "unpkg": "./build/index.umd.js", | ||
| "types": "./build/index.d.ts", | ||
| "type": "module", | ||
| "source": "./src/index.ts", | ||
| "files": [ | ||
@@ -43,6 +40,4 @@ "/build", | ||
| "scripts": { | ||
| "build": "rimraf ./build/ && npm run build:mb && npm run build:types", | ||
| "build:parcel": "parcel build", | ||
| "build:mb": "microbundle", | ||
| "build:types": "tsc", | ||
| "build": "rimraf ./build/ && npm run build:tsc", | ||
| "build:tsc": "tsc", | ||
| "dev": "parcel watch", | ||
@@ -56,16 +51,6 @@ "test": "tsx src/index.test.ts", | ||
| "dependencies": { | ||
| "@statx/core": "^1.1.0", | ||
| "@statx/core": "^1.1.4", | ||
| "react": "^18.2.0" | ||
| }, | ||
| "targets": { | ||
| "build": { | ||
| "context": "browser", | ||
| "distDir": "./build/", | ||
| "source": "./src/index.ts", | ||
| "isLibrary": true, | ||
| "optimize": true, | ||
| "outputFormat": "esmodule" | ||
| } | ||
| }, | ||
| "gitHead": "0c3f0bee1aaed49928d9c1813d81e9c611a1ca87" | ||
| "gitHead": "683ca924f20248d80fe3e05986f01395638e584d" | ||
| } |
| var e=require("react");exports.useStatx=r=>e.useSyncExternalStore(r.subscribe,r); | ||
| //# sourceMappingURL=index.js.map |
| import{useSyncExternalStore as r}from"react";const o=o=>r(o.subscribe,o);export{o as useStatx}; | ||
| //# sourceMappingURL=index.modern.mjs.map |
| {"version":3,"file":"index.modern.mjs","sources":["../src/index.ts"],"sourcesContent":["import {useSyncExternalStore} from 'react'\r\nimport type {Common, StateType} from '@statx/core'\r\n\r\nexport const useStatx = <T extends StateType>(state: Common<T>) => {\r\n return useSyncExternalStore(state.subscribe, state)\r\n}\r\n"],"names":["useStatx","state","useSyncExternalStore","subscribe"],"mappings":"6CAGaA,MAAAA,EAAiCC,GACrCC,EAAqBD,EAAME,UAAWF"} |
| import{useSyncExternalStore as r}from"react";const o=o=>r(o.subscribe,o);export{o as useStatx}; | ||
| //# sourceMappingURL=index.module.js.map |
| {"version":3,"file":"index.module.js","sources":["../src/index.ts"],"sourcesContent":["import {useSyncExternalStore} from 'react'\r\nimport type {Common, StateType} from '@statx/core'\r\n\r\nexport const useStatx = <T extends StateType>(state: Common<T>) => {\r\n return useSyncExternalStore(state.subscribe, state)\r\n}\r\n"],"names":["useStatx","state","useSyncExternalStore","subscribe"],"mappings":"6CAGaA,MAAAA,EAAiCC,GACrCC,EAAqBD,EAAME,UAAWF"} |
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e||self).react={},e.react)}(this,function(e,t){e.useStatx=e=>t.useSyncExternalStore(e.subscribe,e)}); | ||
| //# sourceMappingURL=index.umd.js.map |
| {"version":3,"file":"index.umd.js","sources":["../src/index.ts"],"sourcesContent":["import {useSyncExternalStore} from 'react'\r\nimport type {Common, StateType} from '@statx/core'\r\n\r\nexport const useStatx = <T extends StateType>(state: Common<T>) => {\r\n return useSyncExternalStore(state.subscribe, state)\r\n}\r\n"],"names":["state","useSyncExternalStore","subscribe"],"mappings":"6QAG8CA,GACrCC,EAAoBA,qBAACD,EAAME,UAAWF"} |
Yes
NaN3605
-37.72%11
-31.25%22
-8.33%Updated