4.5.88 • Published 1 year ago

@taktikorg/provident-optio v4.5.88

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@taktikorg/provident-optio

@taktikorg/provident-optio is a tiny React Hook, designed to easily add a loader to all your axios instances.

NPM JavaScript Style Guide

⚙️ Installation

npm install --save @taktikorg/provident-optio

or

yarn add @taktikorg/provident-optio

🚀 Usage

import React, { Component } from 'react'
import axiosInstance from 'axios'

import { useAxiosLoader } from '@taktikorg/provident-optio'

const MyComponent = () => {
  // Pass the axios instance to the hook
  // Allows you tu customize easily your instance
  const [loading] = useAxiosLoader(axiosInstance)
  return (
    <>
      {loading
      ? <img src="path/to/loader"}/>
      : <div>My data</div>
      }
    </>
  )
}

You may also pass an array of URLs to ignore. This is the second parameter accepted by this hook.

const ignoredUrls = ['https://myignoredurl.com', 'anotherignored.co']
const [loading] = useAxiosLoader(axiosInstance, ignoredUrls)

All urls passed in the ignoredUrls variable, won't trigger the loader.

License

MIT © olivier1208


createSymbolcurriedshellhelperconsolebabel-coreredactstringifywhichtestschematypescriptRxJSamazondomES2020ES8fullsignalstrimRighthashbundlingsideassignjson-schemaunicodeefficientjestcloudwatchdatalesscssdefinePropertybootstrap lessnegativeentriesstatecomputed-typesprotosimpledbvalidationbddchildenvglobal objectvaluescolumnlockfileclassnameglacierarraybufferyamles2017extracss-in-jstypeofcertificatespropertieswritesortednegative zerolibphonenumberponyfillautoprefixerpasswordlanguageidentifiersTypedArraycall-binddeepcloneless compilerInt16ArrayastcompilerchromiumsymbolssetPrototypeOfasterisksincludesES2023channelObject.valuesjQueryflatMapArray.prototype.flatless.jsclass-validatortacitstyleseventEmitterbrowserlistinputtslibUint32ArrayObject.getPrototypeOflinkimmutablecharacterpreserve-symlinksbeanstalkfpsfast-deep-copyES2017circularpostcssreadablestreamcollection.es6execfileECMAScript 2021dotenvprocessassertionforktoobjecttextmanagerES2022asyncflagsresolveWebSocketxtermmapreducecryptonumberMaperrorairbnbroute53mapconsthasOwnlogkeyInt8ArrayassertsqsReactiveXformcloudfrontcoercibleFloat64Arraypersistenttraversees2018environmentstylesheetloadingcommand-linei18ncss lessgitignorestreamStreamsreplayhttpsgetPrototypeOfdeep-copyjsdomsubprocesspyyamlwidthiamwalk.gitignoreruntimetypeddefinetouchinspectutilityStreamjwtconcatMapES5clientwgetcensorloggeruploadequalityanimationstructuredCloneRFC-6455deep-cloneECMAScript 2018picomatchparserzodrequestzeroECMAScript 6shamsetImmediate6to5core-jsReactiveExtensionsdragprototypeString.prototype.trimlistenersparseacornSystem.globalcjkSymbol.toStringTagcompile lessconcatexiteveryapilinuxinvariantmonorepoajvfast-copytoolsrdsregular expressionURLSearchParamsisquerystringletes7package managersetterRxtyped arrayECMAScript 5less mixinstoStringTages2015sortcall-boundautheslintmulti-packageArrayBuffer.prototype.slicehandlerESnextendertermroutesetquerygradients csswarningqswaapistringifierweaksetmatchAllcryptStyleSheetwritablekinesisWeakSetendpointexpressforEachgdprfastreact-hooksArray.prototype.flatMaptestingpopmotionjsfunction.lengthtddstreamsdescriptionstyled-componentsviewsignedcolorhandlerswaitrobustsameValueZeroArray.prototype.findLastbrowsershebangjson-schema-validatorhot-0ECMAScript 2017mockmixinspropertyswfes-abstracttypedarraysdeepfpECMAScript 2016reducereventDispatcherHyBihookformjsdiffcloudsearches2016lintpoint-freespeedimportexportconfigexpressionmatchObservablesserviceFloat32ArraylesselmimmerFunction.prototype.nameglobalstartertypesvalidaterandomvalidatorarraysremovegroupautoscalingECMAScript 7variables in cssgetspinnersigtermmetadatafromflattenemitttystatuspluginfullwidthpuretypequeueMicrotaskeslint-pluginArray.prototype.includessometoolkitsettingsfunctionspostcss-pluginhttpTypeBoxUnderscorespringproxyomitIteratorArrayBuffer#slicedirindicatorgroupByArrayinterruptsajaxdeterministicBigUint64ArrayprivateargvArray.prototype.containsRegExp#flagserror-handlingprotocol-buffersvestencryptioninternal slotfastclonelazyposecss variablebannerdynamodbrangeerrorterminalelasticacheurlstylingflagperformanceaccessorPushreal-timemodulespecmodules_.extenddiffowngraphqlArray.prototype.filtercoreeslintpluginfilefixed-widthargspredictableJSON-SchemabcryptformatcopyinawssnsboundeslintconfigObject.definePropertylengthdependenciesCSSgetintrinsiceffect-tsio-tsselfquoteglobalThis0inferencereact-testing-libraryhelpersnpmignorebindfetchObject.entriesfigletjson-schema-validationuser-streamsdescriptorscss nestingsymlinkpromisepinoec2dom-testing-libraryURLfunctionqueuenested csscallstoragegatewayflatpipenpmpushkeyscommanddatastructurejsxdroptesterjapanesescheme-validationglobal this valueJSONmacosfindLastIndexstringcommandertelephonetrimLeftminimalstyleloggingES2021RegExp.prototype.flagsbusyextends3whatwghardlinksformattingelbwindowsuperagentiterationless cssprotobufshimtypedarraycallbind256serializationreactnopecssvarsshrinkwrapnamefull-widthtrimlruconsumeoperating-systembufferdataviewbufferstypeerrorpreprocessorframerbytetranspilerpositiveawesomesaucelivemkdirutilenvironmentsserverfast-clonetranspilevalidescapeopensslsyntaxdirectoryhigher-orderbyteLengthfluxES2015ES3intrinsiccallbackBigInt64ArraybyteOffset3dstyleguideargumentECMAScript 2022Uint16ArrayECMAScript 2023String.prototype.matchAllmergeYAMLtrimStartmomentbabelcompareinstallerslicegetOwnPropertyDescriptormake dirsymlinksexit-codeobjectfast-deep-clonewafnativecloudformationgettervpcworkeraccessibilitystablejsonschemaES2018mobileback-endtypanionestreeramdahasOwnPropertyidleexecdayjsgenericsglobsignalnodeESes5joiObservableartregular-expressionArray.prototype.findLastIndex__proto__ebsArrayBufferrecursiveObjectweakmapObject.fromEntriesimporteventsECMAScript 3WeakMapserializeoptimistObject.keysmkdirsES2019Uint8Arrayexecutejshintredirect.envespreebindataViewrgbarrayES2016windowsroutingcloudtrailrapidirqdatevaryuppackagessuperstructcollectionsafeECMAScriptutilitiesbootstrap csspropfilterobjoptionprogressdeleteES6react posereact animationreact-componentReflect.getPrototypeOffindtimeclassesstatelessES7util.inspectisConcatSpreadablel10ntransportbinariesObject.assignhas-ownoutput@@toStringTaggetoptpnpm9front-endTypeScriptreact-hook-formspawncolumnsmockingbrowserslistasciiharmonyfsphoneoptimizerieAsyncIteratorconfigurableagenttostringtagmruprettytake
4.5.88

1 year ago

4.5.87

1 year ago

4.4.87

1 year ago

4.4.86

1 year ago

4.4.85

1 year ago

4.4.84

1 year ago

4.3.84

1 year ago

4.3.83

1 year ago

4.3.82

1 year ago

4.3.81

1 year ago

4.3.80

1 year ago

4.3.79

1 year ago

4.3.78

1 year ago

4.3.77

1 year ago

4.3.76

1 year ago

4.2.76

1 year ago

4.2.75

1 year ago

4.2.74

1 year ago

4.2.73

1 year ago

3.2.73

1 year ago

3.2.72

1 year ago

3.2.71

1 year ago

3.2.70

1 year ago

3.2.69

1 year ago

3.2.68

1 year ago

3.2.67

1 year ago

3.2.66

1 year ago

3.2.65

1 year ago

3.2.64

1 year ago

3.2.63

1 year ago

2.2.63

1 year ago

2.2.62

1 year ago

2.2.61

1 year ago

2.2.60

1 year ago

2.2.59

1 year ago

2.2.58

1 year ago

2.2.57

1 year ago

2.2.56

1 year ago

2.2.55

1 year ago

2.2.54

1 year ago

2.2.53

1 year ago

2.2.52

1 year ago

2.2.51

1 year ago

2.2.50

1 year ago

2.2.49

1 year ago

2.2.48

1 year ago

2.2.47

1 year ago

2.1.47

1 year ago

2.1.46

1 year ago

2.1.45

1 year ago

2.1.44

1 year ago

2.1.43

1 year ago

2.1.42

1 year ago

2.1.41

1 year ago

2.1.40

1 year ago

2.1.39

1 year ago

2.0.39

1 year ago

2.0.38

1 year ago

2.0.37

1 year ago

2.0.36

1 year ago

2.0.35

1 year ago

2.0.34

1 year ago

2.0.33

1 year ago

2.0.32

1 year ago

2.0.31

1 year ago

2.0.30

1 year ago

2.0.29

1 year ago

2.0.28

1 year ago

2.0.27

1 year ago

2.0.26

1 year ago

2.0.25

1 year ago

2.0.24

1 year ago

2.0.23

1 year ago

2.0.22

1 year ago

2.0.21

1 year ago

2.0.20

1 year ago

2.0.19

1 year ago

2.0.18

1 year ago

2.0.17

1 year ago

2.0.16

1 year ago

2.0.15

1 year ago

2.0.14

1 year ago

2.0.13

1 year ago

2.0.12

1 year ago

2.0.11

1 year ago

2.0.10

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago