Comparing version
@@ -209,4 +209,2 @@ import React,{useState,useRef,useCallback,useEffect,useContext,useMemo}from'react';const shallowEqual = require("fbjs/lib/shallowEqual"); | ||
const onServer = typeof window === "undefined"; | ||
console.log(`Pullstate Core creating action with options`); | ||
console.log({ shortCircuitHook, cacheBreakHook, postActionHook, clientStores }); | ||
let cacheBreakWatcher = {}; | ||
@@ -246,8 +244,13 @@ let watchIdOrd = 0; | ||
} | ||
return [ | ||
true, | ||
true, | ||
runPostActionHook(cache.results[key][2], args, stores, EPostActionContext.CACHE), | ||
false, | ||
]; | ||
if (cache.results[key][1]) { | ||
return [ | ||
cache.results[key][0], | ||
cache.results[key][1], | ||
runPostActionHook(cache.results[key][2], args, stores, EPostActionContext.CACHE), | ||
cache.results[key][3], | ||
]; | ||
} | ||
else { | ||
return cache.results[key]; | ||
} | ||
} | ||
@@ -395,4 +398,2 @@ } | ||
} | ||
console.log(`Running async function`); | ||
console.log({ shortCircuitHook }); | ||
if (shortCircuitHook !== undefined) { | ||
@@ -399,0 +400,0 @@ const shortCircuitResponse = shortCircuitHook(args, clientStores); |
@@ -208,4 +208,2 @@ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopDefault(e){return(e&&(typeof e==='object')&&'default'in e)?e['default']:e}var React=require('react'),React__default=_interopDefault(React);const shallowEqual = require("fbjs/lib/shallowEqual"); | ||
const onServer = typeof window === "undefined"; | ||
console.log(`Pullstate Core creating action with options`); | ||
console.log({ shortCircuitHook, cacheBreakHook, postActionHook, clientStores }); | ||
let cacheBreakWatcher = {}; | ||
@@ -245,8 +243,13 @@ let watchIdOrd = 0; | ||
} | ||
return [ | ||
true, | ||
true, | ||
runPostActionHook(cache.results[key][2], args, stores, EPostActionContext.CACHE), | ||
false, | ||
]; | ||
if (cache.results[key][1]) { | ||
return [ | ||
cache.results[key][0], | ||
cache.results[key][1], | ||
runPostActionHook(cache.results[key][2], args, stores, EPostActionContext.CACHE), | ||
cache.results[key][3], | ||
]; | ||
} | ||
else { | ||
return cache.results[key]; | ||
} | ||
} | ||
@@ -394,4 +397,2 @@ } | ||
} | ||
console.log(`Running async function`); | ||
console.log({ shortCircuitHook }); | ||
if (shortCircuitHook !== undefined) { | ||
@@ -398,0 +399,0 @@ const shortCircuitResponse = shortCircuitHook(args, clientStores); |
{ | ||
"name": "pullstate", | ||
"version": "0.8.0-alpha.0", | ||
"version": "0.8.0-alpha.1", | ||
"description": "Simple state stores using immer and React hooks", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
1321
0.15%83867
-0.03%