npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@washingtonpost/red-react-lib

v2.0.8

Published

This lib points to be a shared codebase for the different projects inside the WP.

Downloads

64

Maintainers

mballenwp1mballenwp1hannah.goodhannah.goodgregmanifoldgregmanifolddnparmardnparmarvladimirjvvladimirjvcatherine1234catherine1234mfernanda-sosamfernanda-sosadev-javudev-javuvviswavviswanetolm-wpnetolm-wpyeswapoyeswapoharmanwapoharmanwapolpadillac4slpadillac4srjayarjayagranadoslopezgranadoslopezcashackcashackcourtneybeeschcourtneybeeschjoshhoegenjoshhoegenthiago_srptthiago_srptalefkowalefkowmichelle_markmichelle_markysmildeysmildeshrddhawashpostshrddhawashposthanj.washposthanj.washpostkarenwangkarenwangcarsonologycarsonologyyuyanleiyuyanleidbnappdbnappcolemanc4colemanc4vpenneyvpenneystevethedevstevethedevdkaodkaoelenalaceyelenalaceyzhoyoyozhoyoyodwuandjunedwuandjunefransandifransandiashendrukashendrukmichaeldominemichaeldominemark-a-wapomark-a-wapolenacohenlenacohenchris93007chris93007sabrinamochisabrinamochijorgemhc-devjorgemhc-devcarlyncarlyndgreen19dgreen19josephjamesjosephjamesniko_komniko_komnicrocsnicrocsavalbuenaavalbuenasotojlsotojlhaileyhaymondhaileyhaymondlukaskeelwapolukaskeelwapotimborisenkotimborisenkobantupallikbantupallikkt-prrykt-prryjesse.post.washpojesse.post.washpothreeteaspoonsthreeteaspoonsemilycsabensemilycsabensluciovillaluciovillatam.stephtam.stephagillespieagillespieani512ani512vonoehsenevonoehseneemmakumeremmakumeraggyjleeaggyjleelavanderoilavanderoiemily.engemily.englmelgarlmelgarsadbumblebeesadbumblebeejanicekchenjanicekchenjamelhendricksjamelhendricksryanpicouryanpicoucrunchwrap78crunchwrap78welchkwelchkval-l-hoslerval-l-hoslernick.mourtoupalasnick.mourtoupalasbenjakibenjakibattandbattandjon.rosadojon.rosadojacknugent27jacknugent27asamireissaasamireissacourthcourthmahigmahigjchaskelljchaskelllorenzoglorenzogln-washpostln-washpoststericsonstericsontalpert022talpert022gengelgengeltuckabelletuckabellenauticaharvinnauticaharvinaadittambeaadittambenatalievinebergnatalievinebergkrbrookskrbrookskatty-huertaskatty-huertasmariaalconadabrooksmariaalconadabrooksjuniorh28juniorh28atomictangerineatomictangerineemlorraineemlorrainehelmschelmsctriticotriticopranavganorepranavganoredanacasidydanacasidyterrywpterrywpksemanur8ksemanur8dreyvitserdreyvitsermvoneshmvoneshchelseaconradchelseaconradarnolda-wparnolda-wphermionewyhermionewywp-abergwp-abergsheamus-heisheamus-heihaysstephaniehaysstephaniebroadwaternebroadwaterneandrevincandrevinckat-alokat-alodaniellersauldaniellersaulstevefuenteswpstevefuenteswprekha26rekha26marcnahedmarcnahedamiemunozamiemunozchloelangstonchloelangstonmartinezymartinezyseanwaposeanwapoducroquetducroquetjakekarajakekarajtotoolejtotoolemjperalesmjperalesarturgalochaarturgalochaebgrangerebgrangerramyalamatiramyalamatiadamsrobwadamsrobwluke.connorsluke.connorswrneffwrneffmcdohmcdohfloresafloresataliatrackimtaliatrackimlennybronnerlennybronnerbitsoglassbitsoglassit_procurementit_procurementdavidchaiwapodavidchaiwapomaddoxnelsonmaddoxnelsonjuliebaconjuliebaconstephanie.clarkstephanie.clarkjasonvuongjasonvuongjkoo87jkoo87kankelcrkankelcrgregoryauld2014gregoryauld2014uncompileduncompiledjbrown4jbrown4scarothersscarotherskhan.salauddinkhan.salauddinrowhawnrowhawnsubs-npm-buildersubs-npm-buildernealhumphreywaponealhumphreywapoashlynstillashlynstillptnielsenptnielsenleslie-sleslie-scourtney-kancourtney-kankevin.schaulkevin.schauljakecrumpjakecrumpmacallahmacallahjmuyskensjmuyskensmadisonwallsmadisonwallsbrianaabrianaadsantamarinadsantamarinaartmsilvaartmsilvaashtolashtolsberhanusberhanujjalcantarajjalcantaraalyssa.fowersalyssa.fowersjoemfoxjoemfoxreubenfbreubenfbcalcantaracalcantaraadrianblancoadrianblancochiquiestebanchiquiestebaniuraizeeiuraizeebdgrossbdgrossulmonicaulmonicabmferrillbmferrilldankeatingdankeatingemamdemamdtimmekotimmekokevinuhrmacherkevinuhrmachershellytanshellytanharrystevensharrystevenschrisrukanchrisrukanallisonnmannallisonnmannaaronsteckelbergaaronsteckelbergshruthagandlashruthagandlabrafordabrafordahannahmahonhannahmahonadityajain15adityajain15linorabolinilinorabolinianthonyjpesceanthonyjpesce1313davidlee1313davidleekate.rabinowitzkate.rabinowitzfontcfontccecepascualcecepascualvsingarayarvsingarayararamzsaramzsruxkruxknader_heidarinader_heidarithompsond3thompsond3tylerremmeltylerremmeltmac0201tmac0201joemoore-postjoemoore-postealvarez79ealvarez79hdormidohdormidosgpottssgpottsyutaochenyutaochennwalker_wpnwalker_wpapbestapbestbriannaschroerbriannaschroershikha-subshikha-subnaemanaemachloemeisterchloemeisterjulia.ledurjulia.ledursolomonsscottsolomonsscottbetchavarriabetchavarriaeewrighteewrightnickkirkpatricknickkirkpatricktrann_wapotrann_wapotobefrankhjtobefrankhjessiekimessiekimsergio.pecanhasergio.pecanhameganwaltermeganwalteralyssabartuchalyssabartuchalexisbarnesalexisbarnesdmoriarty6dmoriarty6mokhtar.alimokhtar.alidpham5dpham5klimenkovdklimenkovddavisshaverdavisshaveraaronbrezelaaronbrezelmoodypaige.emoodypaige.ekastningjkastningj

Keywords

Readme

red-react-lib

This lib points to be a shared codebase for the different projects inside the WP.

For the time being we are using it as a git subtree

Updating this lib

In order to update/commit an update, the code needs to be built before pushing.

To build the project run

yarn install
yarn build

Modules

Functions

hooks

usePrevious(value)

usePrevious Hook

Got from https://usehooks.com/usePrevious/ It saves the previous value of props or state

Kind: global function

| Param | Type | Description | | --- | --- | --- | | value | * | The value to save |

Example

const [state, setState] = React.useState()
const prev = usePrevious(state)

usePromiseCallback(promise, deps, delayMS)

usePromiseCallback Hook

Hook dedicated to offer a sync way of accessing a promise state.

Keeps the last result until new results are loaded, to avoid UI flashes.

Supports a delayMS param to customise the loading threshold, to avoid UI flashes.

Only processes the last promise call.

Kind: global function

| Param | Type | Description | | --- | --- | --- | | promise | Promise | The promise that would be wrapped | | deps | Array.<any> | extra deps used to re-create the callback | | delayMS | number | The delay in ms to switch the loading state to true |

Example

const [callback, result, loading, err] = usePromiseCallback(Promise.resolve, [], 500)

usePromise(promise, deps, delayMS)

usePromise Hook

Wrapped usePromiseCallback.

It gets triggered on init and every time the args change by default.

Useful to fetch page data.

Kind: global function

| Param | Type | Description | | --- | --- | --- | | promise | Promise | The promise that would be wrapped | | deps | Array.<any> | deps to call the function with | | delayMS | number | The delay in ms to switch the loading state to true |

Example

const [callback, result, loading, err] = usePromise(Promise.resolve, ["hello"], 500)