react-native-global-state-hooks
Version:
This is a package to easily handling global-state across your react-native-components No-redux... The library now includes @react-native-async-storage/async-storage to persist your state across sessions... if you want to keep using the old version without
1 lines • 1.17 kB
JavaScript
var e,t;e=this,t=(e,t)=>(()=>{"use strict";var r={305:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setAsyncStorageItem=void 0;var o=r(888),a=r(390);t.setAsyncStorageItem=function(e,t){var r=t.key;if(r){var s="function"==typeof r?r():r,n=(0,o.formatToStore)(e,{stringify:!0,excludeTypes:["function"]}),p=t.encrypt?"function"==typeof t.encrypt?t.encrypt(n):btoa(n):n;a.asyncStorageWrapper.setItem(s,p)}},t.default=t.setAsyncStorageItem},390:t=>{t.exports=e},888:e=>{e.exports=t}},o={};return function e(t){var a=o[t];if(void 0!==a)return a.exports;var s=o[t]={exports:{}};return r[t](s,s.exports,e),s.exports}(305)})(),"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatToStore")):"function"==typeof define&&define.amd?define(["./asyncStorageWrapper.js","json-storage-formatter/formatToStore"],t):"object"==typeof exports?exports["react-native-global-state-hooks"]=t(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatToStore")):e["react-native-global-state-hooks"]=t(e["./asyncStorageWrapper.js"],e["json-storage-formatter/formatToStore"]);