From 1c696b68d309b9c184eaed25d7147fdf4caa11a6 Mon Sep 17 00:00:00 2001 From: Alex Cory Date: Thu, 19 Mar 2020 13:02:00 -0700 Subject: [PATCH 1/4] added browser support to docs, cleaned up readmes, hopefully fixed `cant update state on unmounted component` memory leak --- README.md | 23 +++++++++++++++++++---- docs/README.md | 29 +++++++++++++++++++++++++---- public/chrome_48x48.png | Bin 0 -> 3678 bytes public/edge_48x48.png | Bin 0 -> 3574 bytes public/firefox_48x48.png | Bin 0 -> 3943 bytes public/opera_48x48.png | Bin 0 -> 2152 bytes public/safari_48x48.png | Bin 0 -> 5240 bytes src/__tests__/useFetch.test.tsx | 7 ++++--- src/useFetch.ts | 11 +++++++---- 9 files changed, 55 insertions(+), 15 deletions(-) create mode 100644 public/chrome_48x48.png create mode 100644 public/edge_48x48.png create mode 100644 public/firefox_48x48.png create mode 100644 public/opera_48x48.png create mode 100644 public/safari_48x48.png diff --git a/README.md b/README.md index bb109676..4a5536f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ - - - +[![use-http logo][3]][5]
@@ -875,10 +873,19 @@ Does your company use use-http? Consider sponsoring the project to fund new feat

+Browser Support +--------------- + +If you need support for IE, you will need to add additional polyfills. The React docs suggest [these polyfills][4], but from [this issue][2] we have found it to work fine with the [`react-app-polyfill`]. If you have any updates to this browser list, please submit a PR! + +| [IE / Edge]()
Edge | [Firefox]()
Firefox | [Chrome]()
Chrome | [Safari]()
Safari | [Opera]()
Opera | +| --------- | --------- | --------- | --------- | --------- | --------- | --------- | +| 12+ | last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions + Feature Requests/Ideas ---------------------- -If you have feature requests, let's talk about them in [this issue](https://github.com/alex-cory/use-http/issues/13)! +If you have feature requests, [submit an issue][1] to let us know what you would like to see! Todos ------ @@ -1042,3 +1049,11 @@ const App = () => { } ``` + + +[1]: https://github.com/alex-cory/use-http/issues/new?title=[Feature%20Request]%20YOUR_FEATURE_NAME +[2]: https://github.com/alex-cory/use-http/issues/93#issuecomment-600896722 +[3]: https://github.com/alex-cory/use-http/raw/master/public/dog.png +[4]: https://reactjs.org/docs/javascript-environment-requirements.html +[5]: http://use-http.com +[`react-app-polyfill`]: https://www.npmjs.com/package/react-app-polyfill \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 2b9273cd..e0493a5d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ - +![use-http logo][3]

useFetch

@@ -821,6 +821,7 @@ useFetch(options) Who's using use-http? ===================== +
@@ -836,11 +837,23 @@ Who's using use-http?
+Browser Support +=============== + +If you need support for IE, you will need to add additional polyfills. The React docs suggest [these polyfills][4], but from [this issue][2] we have found it to work fine with the [`react-app-polyfill`]. If you have any updates to this browser list, please submit a PR! + +| [IE / Edge]()
Edge | [Firefox]()
Firefox | [Chrome]()
Chrome | [Safari]()
Safari | [Opera]()
Opera | +| --------- | --------- | --------- | --------- | --------- | --------- | --------- | +| 12+ | last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions + Feature Requests/Ideas ====================== -If you have feature requests, let's talk about them in [this issue](https://github.com/alex-cory/use-http/issues/13)! - +``` + +--> + +[1]: https://github.com/alex-cory/use-http/issues/new?title=[Feature%20Request]%20YOUR_FEATURE_NAME +[2]: https://github.com/alex-cory/use-http/issues/93#issuecomment-600896722 +[3]: https://github.com/alex-cory/use-http/raw/master/public/dog.png +[4]: https://reactjs.org/docs/javascript-environment-requirements.html +[`react-app-polyfill`]: https://www.npmjs.com/package/react-app-polyfill \ No newline at end of file diff --git a/public/chrome_48x48.png b/public/chrome_48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..6a6d42550b325f12014e16cd4348cb1b1bb97038 GIT binary patch literal 3678 zcmV-k4x#ahP)<1}iVsxDrl&d))8fNDB%EMkVS zc9Vp`&63MsnmKm)^*{xna^uwxDu`@<^$VFP8b>xB9`b;8EI)p+8yS9suh*VW6fIO2 zgZH2cD5@weT0x|B1S5#C5Cpq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?1Pajb(QqwyMGS4UP3Ze+%NGqHcQ%h>NBGnoaYJ%R|RSG3w7s735A zJ3hJG@{Z#VjJ{$;0j4q!;Jm7>R(E}+Z}?m8+fsi$z`T-E4ng)^ zvX(2I=lRf_1jK*^WU9riDC#^!G17>sl|7f82B*#` z;UmGwq~;aDp&HccdfUFi_$k1??(VkcTLG?00<;ft_d)~s>`*md8OVRnhvtPC@o4JZ zSevZ|UeP$lI?qrs;@rs76Sp`qNkHcqw8_Qp|6Bl2UFs!v|> z^)Aeqk)4g{U-AtnB{Vgw?p`1+YYpInvD*B&GxK2|nwP1StO}s1*R0-)Mh@$o43;83 zz1Z@uSNzOgvkqUrj+t`&mLqJG3p}8? z{pH0`K6t$b<^^hGVN>_FP1DpwEz)Iy;pQ{yxZ4wYtA#$L{C`paQURMTeajk01C~4TdgT%Y$LnUGq)U8OoufHS3PS z{7|PEm>t+zm!2Nwy0nV(rdqH2(Or9@!@lfs;+mW-jkSzF2xRcmwLBD7-#JfwXiS{7 wQlDFJ)75S1gq_mZUAGexUTbyrfbtOde}>`xWbxlaivR!s07*qoM6N<$g6jMD8UO$Q literal 0 HcmV?d00001 diff --git a/public/edge_48x48.png b/public/edge_48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..e3ed827dab1bd3a785f6801b19f885cfc2aa9b7e GIT binary patch literal 3574 zcmV>c0w}^b&Y7wg8CcO{0ummmdW0hlK({!-T1E`;Gbo7`W^*n04j4=0zb*} zeIO1q27=Kf40bCb7)mtIX0%pwdQOASX3c#PSO+lK-`+mX!suovzn6uW*>?YA0El4z zXyeyHJPeF6K()f)WI_-!v4;?9fX1RR4Bf7aG$7|WN}AuXQ{;n5gVzC@`rY|d(!dMt zM(KBEI54nz)1xv_1q98LMS2Uk4+7kP^R5`cAOYhE4B!Hi3=#lfAghT)3Q3bmJS!z0 zmDBLqHPXjw^jXy1k%4+Zfs`r-V&jI#wdLIl`~{KjF;={oD8d*c*gb755MW@uECyr@ z2qOiOQW86ZQ=;a?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^`M1psWo$nC;T;B&yw0=`d+YE9q-Ha37|0~VvnXonc=Sc2mS;5_!CcsL7y zjRAm{8165auxyMZVZ*K&75YnXr-!0q8?g^+(*Re%d=LB^;Qb1JAG8G&00;mq_Cd|; ziL&qQl%Gx045v=}@UeiGUG-4{3{V_H0G9pvi?Q{(_b{A!Oe z${DD%6r~O=EdT4*nyG8wD*+z>Zew$A!4T0INdU5`E03mZS`AS_`9J~y2>=MdzzX1w zZ5E<&RB(KQRNeuw&yTxE?1cdk55)Y<<|=|A&@rt??tb0}_G0U*>=zU~Cfsw>1->y^Fxa)2S zaV^Z}G55AWrm-k$1~i9X4$aTf{l~?)w-{ki2K28=G(Z6gj&H1VYuNbxO7OvdCJC1 z=xn;wnxC<3P!cIiN+1A%4a9ovFXMP0a5jMUKHe7;xXau4SD3oW?GhlM0thA%w?N!p z=KADx61l8YGf@nZUS+ zL;@PdNUqC>dKkS$E2F=7f=(AH%{ZscUb%8Tu$3{Eef6CMB7orEK+Ep>HvSW~UFCKH w5<)4Z1wSI6_?l~L{heQvNy#_@F#iGn4{kdw(XYh4761SM07*qoM6N<$g6805W&i*H literal 0 HcmV?d00001 diff --git a/public/firefox_48x48.png b/public/firefox_48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..3e1b89fa488df6b1508ef624dfe7e56e9a18517e GIT binary patch literal 3943 zcmV-t518fE&w>6!2Jy17@P>Ce?P#lPFXQO-MI{~2WJO}08X`42qJ*-mz1&s zhWV2L9bd%b08S%TY6b!4+qhjBI2YG{=%N-s>t_5#{p?f)j0w3vW%wW=TpjowUMsVQ z36KFe(DvW0tyuu4&NH;jGl*g15GSZ$muOrlW*0L*QQuv{@Uv4%C4tZuOu{w4Tnzu#S@7L`$)fdTm(s!{y1u0hhzg3WgP$$J1UkAyA_E~ zQ?U+s0RRaH`20)WD_6h&M*@%!z21*+E*Z$?6d>jx3N8=?Q~`tjpe%&XrLcsl@Kkd@#E0kHkZC)4Ilgq2&=ECc-NOAplx zPq`ri`N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y19mFveR5EA+&Et@O2zbOi zAljVdh}i7@J|SArTW(ViCcK;&b$>wcO9AHs3K)R&pR^JHVDOYvI!;)5MYW*NiO(npAjHvHxp2nbzZ_@;7Xw2`w zE@*bXF6fTThdQ>jkV3u&+%a}U0Eb3WJ@DQ@qa9z^7J%$7ms7EmO;b@*<<@i+X4V)n zIPOi2WNaFmQ=kd4-vmblz+rU)C=g+>D(KZ6%FfVyIWm7rYUir}{TM_6gGRD+mwRzZ z&42fR2qbg4v55WHHBnO~DeE{j<8<1f>bPeRZ-QXW&aVX8KLqRz0-&-Is7kP~RFJGi z+0i-{p^%oGPhr;tF4jp8KnB=1z-{gWuz!f3ZCwp<0}=Zkn%jxGPEr-IZA?x=yQQNb zU?cwG&JSUq0FDSlR%Xi1a$o58BI?l#)f_^ITFNO_`b~g~#5?NK(BRR`m5#vWZ|k0% literal 0 HcmV?d00001 diff --git a/public/opera_48x48.png b/public/opera_48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..5ab23ff3eca451f60d48d41846f6e2983caf19dd GIT binary patch literal 2152 zcmV-u2$%PXP)8Ic9*_qvM#xt`@L@`1uH|W3w#uEA(+*cR(GAKX;<^u19KqKf-a67a>UlVBev~avm zfdMcIE`v0f1*G71+QEBZR3_ICWRjh!k9{KEErNC!^n+wYp(YjhW(^r$R|yc6u&VH+7I^Wn)7o_SO@UzOnI1I3nv~GoZ}TM z^kNi0!9_}ja$u|Nay#BmCo4kEKGS%8f54nPSP~q6Dj56&oIV%~(!r7v`dvwh4Lg8b z@Em>AbBQs|A+*Oz%f|(0q`X{TPVr~CzzjPVmRj|L3ZWy7jG-yh_#*np)Oj4C)g7Dfk436uj`uk z`DjJO_fZfr(zTxqdqN<;kHs{!wWUnJWDhNA<>CJ%){Y3yR45wQ7chLQg>9nYFJKOr zm%BxbS5@tp2!$L#K)Uvm8K3izK#o;cn|befb`KXQ^A(SSdrEMoYZ6Pk!=J9I3Me11 zuHJRLriSt$(NEdEohEB*jRm(3I{;?#Oh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1DzBkl}^8wu7G$1NlQu@36-jaZ#*=drMVZpC7=()e6o^w{TpFjTifD z#c7!)=%sqxQKR5ahF)&Ksl4`b->o=~pW(AJ96Vg3;-(@K_m>;EG||OjPqd(Dxb4+) zjDV(igNKYL{J-P{+C^cS3W`b|U$=h!+f8)=%v)jj50=;-J=lm_a#bAns)N-2TX0^Q ziPt&Fv(ru7Qm)~;5*^oLrH?bTE5dm={r@A>*47>#_xfwI3k!>GQG(6W&*1MUJ)Zs{Vp_siIP~yn zAJL)ELjJV;=o?V;XY4Y4z|%0Y&jRjMo}J59c!>n%{T;iOnI0M*7p^zCiaU zzmGWM=ee3{ z9Ss||>F7B#fENa9-c=R4cXpBH9h;;2$K@*i@yxNgnlEctRR+8lhv;6fSq3(3*U{)| zFtlwy&Y!<Dc z-u(s^OrA1r!lFeB*REc<+*rS6Wt|{nS(80EBWJ}%Y#9~CjiU+@zm0W2Wf?{iN80000 { afterEach((): void => { fetch.resetMocks() cleanup() + test.cleanup() }) @@ -939,7 +940,6 @@ describe('useFetch - BROWSER - persistence', (): void => { expect(fetch).toHaveBeenCalledTimes(1) }) - it('should have `cache` in the return of useFetch', async (): Promise => { const { result } = renderHook( () => useFetch({ url: 'https://persist.com', persist: true }, []) @@ -953,6 +953,7 @@ describe('useFetch - BROWSER - persistence', (): void => { }) it('should error if passing wrong cachePolicy with persist: true', async (): Promise => { + try { const { result } = renderHook( () => useFetch({ url: 'https://persist.com', persist: true, cachePolicy: NO_CACHE }, []) @@ -960,7 +961,7 @@ describe('useFetch - BROWSER - persistence', (): void => { expect(result.current.error).toBe(undefined) } catch (err) { expect(err.name).toBe('Invariant Violation') - expect(err.message).toBe(`You cannot use option 'persist' with cachePolicy: no-cache 🙅‍♂️`) + expect(err.message).toBe('You cannot use option \'persist\' with cachePolicy: no-cache 🙅‍♂️') } try { @@ -970,7 +971,7 @@ describe('useFetch - BROWSER - persistence', (): void => { expect(result.current.error).toBe(undefined) } catch (err) { expect(err.name).toBe('Invariant Violation') - expect(err.message).toBe(`You cannot use option 'persist' with cachePolicy: network-only 🙅‍♂️`) + expect(err.message).toBe('You cannot use option \'persist\' with cachePolicy: network-only 🙅‍♂️') } }) }) diff --git a/src/useFetch.ts b/src/useFetch.ts index 91bdc995..1f8239dd 100644 --- a/src/useFetch.ts +++ b/src/useFetch.ts @@ -51,6 +51,7 @@ function useFetch(...args: UseFetchArgs): UseFetch { const hasMore = useRef(true) const suspenseStatus = useRef('pending') const suspender = useRef>() + const mounted = useRef(false) const [loading, setLoading] = useState(defaults.loading) const forceUpdate = useReducer(() => ({}), [])[1] @@ -78,7 +79,7 @@ function useFetch(...args: UseFetchArgs): UseFetch { interceptors.request ) - if (!suspense) setLoading(true) + if (!suspense && mounted.current) setLoading(true) error.current = undefined if (response.isCached && cachePolicy === CACHE_FIRST) { @@ -86,11 +87,11 @@ function useFetch(...args: UseFetchArgs): UseFetch { res.current = response.cached as Res res.current.data = await tryGetData(response.cached, defaults.data) data.current = res.current.data as TData - if (!suspense) setLoading(false) + if (!suspense && mounted.current) setLoading(false) return data.current } catch (err) { error.current = err - setLoading(false) + if (mounted.current) setLoading(false) } } @@ -134,7 +135,7 @@ function useFetch(...args: UseFetchArgs): UseFetch { controller.current = undefined } - if (!suspense) setLoading(false) + if (!suspense && mounted.current) setLoading(false) return data.current } // end of doFetch() @@ -182,12 +183,14 @@ function useFetch(...args: UseFetchArgs): UseFetch { // onMount/onUpdate useEffect((): any => { + mounted.current = true if (Array.isArray(dependencies)) { const methodName = requestInit.method || HTTPMethod.GET const methodLower = methodName.toLowerCase() as keyof ReqMethods const req = request[methodLower] as NoArgs req() } + return () => mounted.current = false // TODO: need [request] in dependency array. Causing infinite loop though. // eslint-disable-next-line react-hooks/exhaustive-deps }, dependencies) From 302780b1140a0b6d5844db03c1b436ec80ded871 Mon Sep 17 00:00:00 2001 From: Alex Cory Date: Thu, 19 Mar 2020 13:11:33 -0700 Subject: [PATCH 2/4] removing images --- public/chrome_48x48.png | Bin 3678 -> 0 bytes public/edge_48x48.png | Bin 3574 -> 0 bytes public/firefox_48x48.png | Bin 3943 -> 0 bytes public/opera_48x48.png | Bin 2152 -> 0 bytes public/safari_48x48.png | Bin 5240 -> 0 bytes 5 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 public/chrome_48x48.png delete mode 100644 public/edge_48x48.png delete mode 100644 public/firefox_48x48.png delete mode 100644 public/opera_48x48.png delete mode 100644 public/safari_48x48.png diff --git a/public/chrome_48x48.png b/public/chrome_48x48.png deleted file mode 100644 index 6a6d42550b325f12014e16cd4348cb1b1bb97038..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3678 zcmV-k4x#ahP)<1}iVsxDrl&d))8fNDB%EMkVS zc9Vp`&63MsnmKm)^*{xna^uwxDu`@<^$VFP8b>xB9`b;8EI)p+8yS9suh*VW6fIO2 zgZH2cD5@weT0x|B1S5#C5CpqTw&T}!cHg&v&9%Gl5IbwO0UR?#wmkPqOiN#%XsKiX zms@n?{Al0a5BqB6Wg0cIcn{!PGN=lGwvMR~dhn8}9}1UCWMprJE>yL2I>MR6U@80i-$tHFTlBj##M#(CTAL; zbwmNL-V4?mTPXZ0xBA3a1C`o6x0|U#1b9z7st3$_?=!Re1}gvh>v>YEo@9{Nh}f2S z9!3PPh$zm*u2g(MqGJw7VdHFU*}^sNMeWzfh~L zFvi3p8mI>~Aj%_%0t6tjuU1w>yLbF0_a7&o6ZFk3N4vHQpri;)CPSKY%bNwzr`*2( zJ5(#DSWK)+;JqTE;0*{E5!x|jX{qu62#^CIs;5-{{rB$xFK+DEc31$p=cMJdV0_^M z3%H!kzPeT`f6suk##keU1F|BCOiME9A_YC{nI=aRkk%1Bq#*$u@=U$Mm;-I~HNf{Z zt|cC65oC^91i(vQc!B`#`qPeH^ww`)^Qo8KIEv3@jHn_gipL`e1_2b|ut^X>#DF@8 zV$}QAZ3C^fkNSh=Ql3#k)3LQB#1MJBt9&Y)J^x}dJ-ZtFD{_CW`LQklwoMEgz^%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qoM6N<$g6jMD8UO$Q diff --git a/public/edge_48x48.png b/public/edge_48x48.png deleted file mode 100644 index e3ed827dab1bd3a785f6801b19f885cfc2aa9b7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3574 zcmV>c0w}^b&Y7wg8CcO{0ummmdW0hlK({!-T1E`;Gbo7`W^*n04j4=0zb*} zeIO1q27=Kf40bCb7)mtIX0%pwdQOASX3c#PSO+lK-`+mX!suovzn6uW*>?YA0El4z zXyeyHJPeF6K()f)WI_-!v4;?9fX1RR4Bf7aG$7|WN}AuXQ{;n5gVzC@`rY|d(!dMt zM(KBEI54nz)1xv_1q98LMS2Uk4+7kP^R5`cAOYhE4B!Hi3=#lfAghT)3Q3bmJS!z0 zmDBLqHPXjw^jXy1k%4+Zfs`r-V&jI#wdLIl`~{KjF;={oD8d*c*gb755MW@uECyr@ z2qOiOQW86ZQ=;a?@+5zBr^KD1c~Da|-|Gwycu19;8urKf^-pfieW=mT1y=$!##y+u zrD1f;CxkJ9oc54_@pT4_36g{aN|1ykN|K$EYf8RXmQRtITiUGa$SKtcotgfJirOMu$*1PGi!2}nqg#AqfN$x6v3%fpo73Q6%7 zsb1Hxwxno#9e4*=wffl!sE~V5e=%Nu@BgVV-p>RBdzS|RhEaK8G%CJ3DVeluMkgl^ zlj5k9;^(4X1DKOEUV@TRuqOrp>KB140z;q!fIX^+#wr=W7(kh^W{`5~PfjF@bAC zQ~-k*v5%4h5kNp&S{MQ;1iMy&;XRA3c$G+y)d(An&CRfI&u#0t(cY zZ$na$Q>2svDcXOt33 z0ze*srx6>-1$rwMF?rlU^p9K)B%&FD0*KKR6^)&SKzJnA9$M{AIOP21K)l0rooy9yw}PtM)K z+|;(_(%+q5=C;jICMGDI4y3#*P6?$15|)q*fC=OP7gDDS(PwV!9E0Cn%+jkI!lDyb z;9&)ZK*LDF<2z$)V+?IDv};K;*aznn_Xa+O$mQg7pCxGO%!cVDi;rA(pP9{DS@nza zbFHE*SqiCxb4Iz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Yh4761SM07*qoM6N<$g6805W&i*H diff --git a/public/firefox_48x48.png b/public/firefox_48x48.png deleted file mode 100644 index 3e1b89fa488df6b1508ef624dfe7e56e9a18517e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3943 zcmV-t518fE&w>6!2Jy17@P>Ce?P#lPFXQO-MI{~2WJO}08X`42qJ*-mz1&s zhWV2L9bd%b08S%TY6b!4+qhjBI2YG{=%N-s>t_5#{p?f)j0w3vW%wW=TpjowUMsVQ z36KFe(DvW0tyuu4&NH;jGl*g15GSZ$muOrlW*0L*QQuv{@Uv4%C4tZuOu{w4Tnzu#S@7L`$)fdTm(s!{y1u0hhzg3WgP$$J1UkAyA_E~ zQ?U+s0RRaH`20)WD_6h&M*@%!z21*+E*Z$?6d>jx3N8=?Q~`tjpe%&XrLcsl@Kkd@#E0kHkZC)4Ilgq2&=ECc-NOAplx zPq`ri`NWSuyaG7Kf zbt?MWs|A(I{_$gvzd|w5qnugPnS;({&0*)D>t>-ljrTf8>HD5UQ>U=HrD5mXHs3h? z2Niw>90gd;2;czG3;@(*+*^4INjD&tfY|(>t&iov(;`uU(#aj6nw<7M8`lBbzx>5# zADssqpIU0Xi)z@SqMZ7T2jLbRG0~#W#O4b)@Y+A)s9S%Va_v0cok2<<04g-LL~s%i zX_xOZ;~lDe%7qsLFAlN!f+u$V9g(;EUID|oHqm}f%s!k#Fen^a4kgewAI(C9G8ooT zVt&=TpK#Je8#Zr$YYdT~B~jE=#8f>X2oBkyt|C>hpuO>Yu5_P|ame+40o4>lSt0Cq zO&E^4=yQECK23xT<{Sx}xmu;@2I2?+S)bkXUc%m`1Mc8K$S@+IUJj6uo^zA?y^IsS z{Y*lcl0*;gQ2_-|18@Y;RwBeiZ|8yh^mWhVO859ASGxD-U@!?8C}=_;-~b@z_jcoK zlno+01$cr80uWv@5Ty=A6^{hohM+J4T!3a*_K|=%kb`f$%&%;E?H)Pr%v*)zGZI@h zsDdbnjHUpdBklFGY`FX>gtF%J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h73u(KOszx07)4xQ`y`w49@cNYfaPAM&ONH! zXE3C);q)QHSq*33M(c*reZA3hQy$Ro8&hj8V0v-~bV2F_J;?JNa<8D+d@)!J1Az*> zE6xBI$h`O1Jp}b0)RbrR=GJuS7fMoJHNJm{fDKAGQ@PsZj%RrwR-BQWv%ibr1V^StcXN1?q;uqAS8 zLtQ`-u@G<(+!RT`5UC6qWV9NvG&jk;Z}~aa&Rl@au0<8_lIT5(4NI_8Kom#<26?eS zOa&KQ`8ELHa{lB~6fl8noBOZVA9{gzrk4bBBp9eca2Tz9gbqRwu1c9g!1qvAg=8*vziEpyS$5zXuyaA|6?Luc4q6GP0e)G+)*)Pg>j&92pNYEP|Xnf z5DK=38Fqz9`Y{lTinZkeTU)zn=_2&n*zy$WW22=H8Lx|Gt_JANO@Wswb~H-l6TtmN zB>)*f>gU}RfbDNSboI{LgMBS)mDg-t2osYPW{zqTg3)Y19mFveR5EA+&Et@O2zbOi zAljVdh}i7@J|SArTW(ViCcK;&b$>wcO9AHs3K)R&pR^JHVDOYvI!;)5MYW*NiO(npAjHvHxp2nbzZ_@;7Xw2`w zE@*bXF6fTThdQ>jkV3u&+%a}U0Eb3WJ@DQ@qa9z^7J%$7ms7EmO;b@*<<@i+X4V)n zIPOi2WNaFmQ=kd4-vmblz+rU)C=g+>D(KZ6%FfVyIWm7rYUir}{TM_6gGRD+mwRzZ z&42fR2qbg4v55WHHBnO~DeE{j<8<1f>bPeRZ-QXW&aVX8KLqRz0-&-Is7kP~RFJGi z+0i-{p^%oGPhr;tF4jp8KnB=1z-{gWuz!f3ZCwp<0}=Zkn%jxGPEr-IZA?x=yQQNb zU?cwG&JSUq0FDSlR%Xi1a$o58BI?l#)f_^ITFNO_`b~g~#5?NK(BRR`m5#vWZ|k0% diff --git a/public/opera_48x48.png b/public/opera_48x48.png deleted file mode 100644 index 5ab23ff3eca451f60d48d41846f6e2983caf19dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2152 zcmV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| 2 +- src/storage/localStorage.ts | 43 ++++++++++++------------ src/storage/memoryStorage.ts | 64 +++++++++++++++++++++--------------- 4 files changed, 59 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 4a5536f4..3477f1e2 100644 --- a/README.md +++ b/README.md @@ -900,7 +900,6 @@ Todos - snapshot test resources: [swr](https://github.com/zeit/swr/blob/master/test/use-swr.test.tsx#L1083), [react-apollo-hooks](https://github.com/trojanowski/react-apollo-hooks/blob/master/src/__tests__/useQuery-test.tsx#L218) - basic test resources: [fetch-suspense](https://github.com/CharlesStover/fetch-suspense/blob/master/tests/create-use-fetch.test.ts), [@testing-library/react-hooks suspense PR](https://github.com/testing-library/react-hooks-testing-library/pull/35/files) - [ ] maybe add translations [like this one](https://github.com/jamiebuilds/unstated-next) -- [ ] add browser support to docs [1](https://github.com/godban/browsers-support-badges) [2](https://gist.github.com/danbovey/b468c2f810ae8efe09cb5a6fac3eaee5) (currently does not support ie 11) - [ ] maybe add contributors [all-contributors](https://github.com/all-contributors/all-contributors) - [ ] add sponsors [similar to this](https://github.com/carbon-app/carbon) - [ ] Error handling @@ -937,16 +936,6 @@ Todos .get() ``` -- [ ] maybe add snake_case -> camelCase option to ``. This would - convert all the keys in the response to camelCase. - Not exactly sure how this syntax should look because what - if you want to have this only go 1 layer deep into the response - object. Or if this is just out of scope for this library. - - ```jsx - - ``` - - [ ] potential option ideas ```jsx diff --git a/src/doFetchArgs.ts b/src/doFetchArgs.ts index 77ace3cb..267bcff1 100644 --- a/src/doFetchArgs.ts +++ b/src/doFetchArgs.ts @@ -88,7 +88,7 @@ export default async function doFetchArgs( // TODO: see if `Object.entries` is supported for IE // TODO: if the body is a file, and this is a large file, it might exceed the size - // limit of the key size in the Map + // limit of the key size. Potential solution: base64 the body // used to tell if a request has already been made const responseID = Object.entries({ url, method, body: options.body || '' }) .map(([key, value]) => `${key}:${value}`).join('||') diff --git a/src/storage/localStorage.ts b/src/storage/localStorage.ts index e3294159..360caee4 100644 --- a/src/storage/localStorage.ts +++ b/src/storage/localStorage.ts @@ -12,32 +12,26 @@ const getCache = () => { } } const getLocalStorage = ({ cacheLife }: { cacheLife: number }): Cache => { - // there isn't state here now, but will be eventually - - const remove = async (name: string) => { + const isExpired = (responseID: string) => { const cache = getCache() - delete cache[name] - localStorage.setItem(cacheName, JSON.stringify(cache)) + const { expiration, response } = (cache[responseID] || {}) + const expired = expiration > 0 && expiration < Date.now() + if (expired) remove(responseID) + return expired || !response } - const has = async (responseID: string): Promise => { + const remove = async (...responseIDs: string[]) => { const cache = getCache() - return !!(cache[responseID] && cache[responseID].response) + responseIDs.forEach(id => delete cache[id]) + localStorage.setItem(cacheName, JSON.stringify(cache)) } - const get = async (responseID: string): Promise => { - const cache = getCache() - if (!cache[responseID]) { - return - } - - const { expiration, response: { body, headers, status, statusText } } = cache[responseID] as any - if (expiration < Date.now()) { - delete cache[responseID] - localStorage.setItem(cacheName, JSON.stringify(cache)) - return - } + const has = async (responseID: string) => !isExpired(responseID) + const get = async (responseID: string) => { + const cache = getCache() + if (isExpired(responseID)) return + const { body, headers, status, statusText } = cache[responseID].response return new Response(body, { status, statusText, @@ -47,9 +41,8 @@ const getLocalStorage = ({ cacheLife }: { cacheLife: number }): Cache => { const set = async (responseID: string, response: Response): Promise => { const cache = getCache() - const responseObject = await serializeResponse(response) cache[responseID] = { - response: responseObject, + response: await serializeResponse(response), expiration: Date.now() + cacheLife } localStorage.setItem(cacheName, JSON.stringify(cache)) @@ -59,7 +52,13 @@ const getLocalStorage = ({ cacheLife }: { cacheLife: number }): Cache => { localStorage.setItem(cacheName, JSON.stringify({})) } - return { get, set, has, delete: remove, clear } + return Object.defineProperties(getCache(), { + get: { value: get, writable: false }, + set: { value: set, writable: false }, + has: { value: has, writable: false }, + delete: { value: remove, writable: false }, + clear: { value: clear, writable: false } + }) } export default getLocalStorage diff --git a/src/storage/memoryStorage.ts b/src/storage/memoryStorage.ts index 1bcf87f8..6ebfeb98 100644 --- a/src/storage/memoryStorage.ts +++ b/src/storage/memoryStorage.ts @@ -1,34 +1,44 @@ import { Cache } from '../types' -const inMemoryStorage = new Map() -const getMemoryStorage = ({ cacheLife }: { cacheLife: number }): Cache => ({ - async get(name: string) { - const item = inMemoryStorage.get(name) as Response | undefined - if (!item) return - - const expiration = inMemoryStorage.get(`${name}:ts`) - if (expiration && expiration > 0 && expiration < Date.now()) { - inMemoryStorage.delete(name) - inMemoryStorage.delete(`${name}:ts`) - return +var inMemoryStorage: any = {} +var getMemoryStorage = ({ cacheLife }: { cacheLife: number }): Cache => { + const isExpired = (responseID: string) => { + const expiration = inMemoryStorage[`${responseID}:ts`] + const expired = expiration > 0 && expiration < Date.now() + if (expired) remove(responseID) + return expired + } + + const get = async (responseID: string) => { + if (isExpired(responseID)) return + return inMemoryStorage[responseID] as Response + } + + const set = async (responseID: string, res: Response) => { + inMemoryStorage[responseID] = res + inMemoryStorage[`${responseID}:ts`] = cacheLife > 0 ? Date.now() + cacheLife : 0 + } + + const has = async (responseID: string) => !isExpired(responseID) + + const remove = async (...responseIDs: string[]) => { + for (const responseID of responseIDs) { + delete inMemoryStorage[responseID] + delete inMemoryStorage[`${responseID}:ts`] } + } - return item - }, - async set(name: string, data: Response) { - inMemoryStorage.set(name, data) - inMemoryStorage.set(`${name}:ts`, cacheLife > 0 ? Date.now() + cacheLife : 0) - }, - async has(name: string) { - return inMemoryStorage.has(name) - }, - async delete(name: string) { - inMemoryStorage.delete(name) - inMemoryStorage.delete(`${name}:ts`) - }, - async clear() { - return inMemoryStorage.clear() + const clear = async () => { + inMemoryStorage = {} } -}) + + return Object.defineProperties(inMemoryStorage, { + get: { value: get, writable: false, configurable: true }, + set: { value: set, writable: false, configurable: true }, + has: { value: has, writable: false, configurable: true }, + delete: { value: remove, writable: false, configurable: true }, + clear: { value: clear, writable: false, configurable: true } + }) +} export default getMemoryStorage From 19800b2a2fa1604524505ff11c8862ef265f84f3 Mon Sep 17 00:00:00 2001 From: Alex Cory Date: Mon, 23 Mar 2020 14:25:06 -0700 Subject: [PATCH 4/4] cleanup --- README.md | 1 + src/storage/localStorage.ts | 2 +- src/types.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3477f1e2..09c14471 100644 --- a/README.md +++ b/README.md @@ -914,6 +914,7 @@ Todos - [ ] aborts fetch on unmount - [ ] take a look at how [react-apollo-hooks](https://github.com/trojanowski/react-apollo-hooks) work. Maybe ad `useSubscription` and `const request = useFetch(); request.subscribe()` or something along those lines - [ ] make this a github package + - [see ava packages](https://github.com/orgs/ava/packages) - [ ] get it all working on a SSR codesandbox, this way we can have api to call locally - [ ] make GraphQL examples in codesandbox - [ ] Documentation: diff --git a/src/storage/localStorage.ts b/src/storage/localStorage.ts index 360caee4..81040f08 100644 --- a/src/storage/localStorage.ts +++ b/src/storage/localStorage.ts @@ -29,8 +29,8 @@ const getLocalStorage = ({ cacheLife }: { cacheLife: number }): Cache => { const has = async (responseID: string) => !isExpired(responseID) const get = async (responseID: string) => { - const cache = getCache() if (isExpired(responseID)) return + const cache = getCache() const { body, headers, status, statusText } = cache[responseID].response return new Response(body, { status, diff --git a/src/types.ts b/src/types.ts index edc19f72..446335ca 100644 --- a/src/types.ts +++ b/src/types.ts @@ -159,6 +159,7 @@ export type Interceptors = { response?: (response: Res) => Res } +// this also holds the response keys. It mimics js Map export type Cache = { get: (name: string) => Promise set: (name: string, data: Response) => Promise