@dev-plus-plus/react-await
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -106,6 +106,2 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
React.useEffect(function () { | ||
setState(context.record[getFullName()]); | ||
}, [context.record]); | ||
var getFullName = function getFullName() { | ||
@@ -115,2 +111,6 @@ return "" + name + (index !== undefined ? "__" + index : ''); | ||
React.useEffect(function () { | ||
setState(context.record[getFullName()]); | ||
}, [context.record[getFullName()]]); | ||
var isStateUndefined = function isStateUndefined() { | ||
@@ -136,3 +136,2 @@ return state === undefined; | ||
setState(state); | ||
return _extends({}, data, (_extends2 = {}, _extends2[getFullName()] = state, _extends2)); | ||
@@ -143,3 +142,4 @@ }); | ||
var init = function init() { | ||
return setRecord(exports.AwaitState.LOADING); | ||
setState(exports.AwaitState.LOADING); | ||
setRecord(exports.AwaitState.LOADING); | ||
}; | ||
@@ -146,0 +146,0 @@ |
@@ -105,6 +105,2 @@ import React, { useContext, useState, useEffect, useMemo, useRef, useCallback } from 'react'; | ||
useEffect(function () { | ||
setState(context.record[getFullName()]); | ||
}, [context.record]); | ||
var getFullName = function getFullName() { | ||
@@ -114,2 +110,6 @@ return "" + name + (index !== undefined ? "__" + index : ''); | ||
useEffect(function () { | ||
setState(context.record[getFullName()]); | ||
}, [context.record[getFullName()]]); | ||
var isStateUndefined = function isStateUndefined() { | ||
@@ -135,3 +135,2 @@ return state === undefined; | ||
setState(state); | ||
return _extends({}, data, (_extends2 = {}, _extends2[getFullName()] = state, _extends2)); | ||
@@ -142,3 +141,4 @@ }); | ||
var init = function init() { | ||
return setRecord(AwaitState.LOADING); | ||
setState(AwaitState.LOADING); | ||
setRecord(AwaitState.LOADING); | ||
}; | ||
@@ -145,0 +145,0 @@ |
{ | ||
"name": "@dev-plus-plus/react-await", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "author": "ftgibran", |
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
132462