4.5.88 • Published 10 months ago

@taktikorg/provident-optio v4.5.88

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months 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

10 months ago

4.5.87

10 months ago

4.4.87

10 months ago

4.4.86

10 months ago

4.4.85

10 months ago

4.4.84

10 months ago

4.3.84

10 months ago

4.3.83

11 months ago

4.3.82

11 months ago

4.3.81

11 months ago

4.3.80

11 months ago

4.3.79

11 months ago

4.3.78

11 months ago

4.3.77

11 months ago

4.3.76

11 months ago

4.2.76

11 months ago

4.2.75

11 months ago

4.2.74

11 months ago

4.2.73

11 months ago

3.2.73

11 months ago

3.2.72

11 months ago

3.2.71

11 months ago

3.2.70

11 months ago

3.2.69

11 months ago

3.2.68

11 months ago

3.2.67

11 months ago

3.2.66

11 months ago

3.2.65

11 months ago

3.2.64

11 months ago

3.2.63

11 months ago

2.2.63

11 months ago

2.2.62

11 months ago

2.2.61

11 months ago

2.2.60

11 months ago

2.2.59

11 months ago

2.2.58

11 months ago

2.2.57

11 months ago

2.2.56

12 months ago

2.2.55

12 months ago

2.2.54

12 months ago

2.2.53

12 months ago

2.2.52

12 months ago

2.2.51

12 months ago

2.2.50

12 months ago

2.2.49

12 months ago

2.2.48

12 months ago

2.2.47

12 months ago

2.1.47

12 months ago

2.1.46

12 months ago

2.1.45

12 months ago

2.1.44

12 months ago

2.1.43

12 months ago

2.1.42

12 months ago

2.1.41

12 months ago

2.1.40

12 months ago

2.1.39

12 months ago

2.0.39

12 months 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