react-streaming
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -15,2 +15,3 @@ "use strict"; | ||
const suspenseId = getSuspenseId(key, elementId); | ||
DEBUG && console.log('key', key); | ||
DEBUG && console.log('suspenseId', suspenseId); | ||
@@ -82,5 +83,10 @@ let suspense = suspenses[suspenseId]; | ||
else { | ||
const promise = ret.then((value) => { | ||
const promise = ret | ||
.then((value) => { | ||
updateSuspenseAsync({ state: 'done', value }); | ||
DEBUG && console.log('=== resolver() done', suspense); | ||
}) | ||
.catch((err) => { | ||
updateSuspenseAsync({ state: 'error', err }); | ||
DEBUG && console.log('=== resolver() error', suspense); | ||
}); | ||
@@ -87,0 +93,0 @@ updateSuspenseAsync({ state: 'pending', promise }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.projectInfo = void 0; | ||
const PROJECT_VERSION = '0.3.2'; | ||
const PROJECT_VERSION = '0.3.3'; | ||
exports.projectInfo = { | ||
@@ -6,0 +6,0 @@ projectName: 'react-streaming', |
@@ -13,2 +13,3 @@ export { useSuspense }; | ||
const suspenseId = getSuspenseId(key, elementId); | ||
DEBUG && console.log('key', key); | ||
DEBUG && console.log('suspenseId', suspenseId); | ||
@@ -80,5 +81,10 @@ let suspense = suspenses[suspenseId]; | ||
else { | ||
const promise = ret.then((value) => { | ||
const promise = ret | ||
.then((value) => { | ||
updateSuspenseAsync({ state: 'done', value }); | ||
DEBUG && console.log('=== resolver() done', suspense); | ||
}) | ||
.catch((err) => { | ||
updateSuspenseAsync({ state: 'error', err }); | ||
DEBUG && console.log('=== resolver() error', suspense); | ||
}); | ||
@@ -85,0 +91,0 @@ updateSuspenseAsync({ state: 'pending', promise }); |
@@ -1,2 +0,2 @@ | ||
const PROJECT_VERSION = '0.3.2'; | ||
const PROJECT_VERSION = '0.3.3'; | ||
export const projectInfo = { | ||
@@ -3,0 +3,0 @@ projectName: 'react-streaming', |
{ | ||
"name": "react-streaming", | ||
"description": "React 18 Streaming. Full-fledged & Easy.", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"main": "./dist/cjs/server/hooks.js", | ||
@@ -6,0 +6,0 @@ "peerDependencies": { |
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
82248
1692