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

80

Maintainers

luke.connorsluke.connorswrneffwrneffmcdohmcdohfloresafloresalavanderoilavanderoitaliatrackimtaliatrackimtomkaz-wapotomkaz-wapoaggyjleeaggyjleeemmakumeremmakumervonoehsenevonoehseneani512ani512lennybronnerlennybronnerln-washpostln-washpostjorgemhc-devjorgemhc-devbitsoglassbitsoglassit_procurementit_procurementsabrinamochisabrinamochiseanwaposeanwapolorenzoglorenzogjchaskelljchaskelldavidchaiwapodavidchaiwapoagillespieagillespiemartinezymartinezytam.stephtam.stephcolemanc4colemanc4luciovillaluciovilladucroquetducroquetthreeteaspoonsthreeteaspoonsmaddoxnelsonmaddoxnelsonstephanie.clarkstephanie.clarkjasonvuongjasonvuongjkoo87jkoo87kankelcrkankelcrgregoryauld2014gregoryauld2014uncompileduncompiledjbrown4jbrown4scarothersscarotherskhan.salauddinkhan.salauddinrowhawnrowhawnsubs-npm-buildersubs-npm-buildernealhumphreywaponealhumphreywapoashlynstillashlynstillptnielsenptnielsenleslie-sleslie-scourtney-kancourtney-kankevin.schaulkevin.schauljakecrumpjakecrumpmacallahmacallahjmuyskensjmuyskensmadisonwallsmadisonwallsdsantamarinadsantamarinaartmsilvaartmsilvaashtolashtolsberhanusberhanujjalcantarajjalcantaraalyssa.fowersalyssa.fowersjoemfoxjoemfoxreubenfbreubenfbcalcantaracalcantaraadrianblancoadrianblancochiquiestebanchiquiestebaniuraizeeiuraizeebdgrossbdgrossulmonicaulmonicabmferrillbmferrilldankeatingdankeatingtimmekotimmekokevinuhrmacherkevinuhrmachershellytanshellytanharrystevensharrystevenschrisrukanchrisrukanallisonnmannallisonnmannaaronsteckelbergaaronsteckelbergcarsonologycarsonologyshruthagandlashruthagandlabrafordabrafordafernandowzfernandowzadityajain15adityajain15linorabolinilinorabolinianthonyjpesceanthonyjpesce1313davidlee1313davidleekate.rabinowitzkate.rabinowitzfontcfontccecepascualcecepascualyuyanleiyuyanleivsingarayarvsingarayararamzsaramzsruxkruxknader_heidarinader_heidarithompsond3thompsond3tylerremmeltylerremmeltmac0201tmac0201mahigmahigjoemoore-postjoemoore-postealvarez79ealvarez79hdormidohdormidosgpottssgpottsyutaochenyutaochennwalker_wpnwalker_wpapbestapbestbriannaschroerbriannaschroershikha-subshikha-subnaemanaemachloemeisterchloemeisterjulia.ledurjulia.ledursolomonsscottsolomonsscottbetchavarriabetchavarriaeewrighteewrightcourthcourthnickkirkpatricknickkirkpatricktrann_wapotrann_wapodbnappdbnapptobefrankhjtobefrankhjessiekimessiekimsergio.pecanhasergio.pecanhameganwaltermeganwalteralyssabartuchalyssabartuchalexisbarnesalexisbarneskarenwangkarenwangdmoriarty6dmoriarty6mokhtar.alimokhtar.alidpham5dpham5klimenkovdklimenkovddavisshaverdavisshaverwelchkwelchkasamireissaasamireissakastningjkastningjpranavganorepranavganoreterrywpterrywphermionewyhermionewyamiemunozamiemunozsheamus-heisheamus-heinick.mourtoupalasnick.mourtoupalasshrddhawashpostshrddhawashpostwp-abergwp-abergmarcnahedmarcnahedandrevincandrevincdreyvitserdreyvitserval-l-hoslerval-l-hoslerstevefuenteswpstevefuenteswpadamsrobwadamsrobwjesse.post.washpojesse.post.washporamyalamatiramyalamatiebgrangerebgrangerbroadwaternebroadwaternerekha26rekha26jacknugent27jacknugent27ksemanur8ksemanur8danacasidydanacasidyhaysstephaniehaysstephaniebenjakibenjakiarturgalochaarturgalochajamelhendricksjamelhendrickskat-alokat-alomjperalesmjperalesjtotoolejtotoolejakekarajakekarajon.rosadojon.rosadoarnolda-wparnolda-wpchelseaconradchelseaconradmvoneshmvoneshvithalanisvithalanistimborisenkotimborisenkolukaskeelwapolukaskeelwapojanicekchenjanicekchensadbumblebeesadbumblebeetriticotriticohelmschelmscatomictangerineatomictangerinelmelgarlmelgarjuniorh28juniorh28mariaalconadabrooksmariaalconadabrookskatty-huertaskatty-huertaskrbrookskrbrooksnatalievinebergnatalievinebergaadittambeaadittambenauticaharvinnauticaharvintuckabelletuckabelleemily.engemily.enghaileyhaymondhaileyhaymondlpadillac4slpadillac4sgengelgengelcrunchwrap78crunchwrap78talpert022talpert022stericsonstericsonharmanwapoharmanwaposotojlsotojljosevazqueznpmjosevazqueznpmkt-prrykt-prryavalbuenaavalbuenanicrocsnicrocsniko_komniko_komtab00tab00marcostarafwashpostmarcostarafwashpostjosephjamesjosephjamesdgreen19dgreen19carlyncarlynalvaror2walvaror2wkarklislkarklislclau8aclau8ajmiguelfloresgjmiguelfloresgvladimirjvvladimirjvtawaddytawaddyalvarovalinoalvarovalinoalefkowalefkowysmildeysmildenetolm-wpnetolm-wpallidinatallidinatmark-a-wapomark-a-wapoflaviopsantannawapoflaviopsantannawapojondavenportwapojondavenportwapomichaeldominemichaeldomineashendrukashendrukgiomarwizegiomarwizedev-javudev-javucatherine1234catherine1234vviswavviswacashackcashackdnparmardnparmargregmanifoldgregmanifoldhannah.goodhannah.goodmalocuevimalocuevilmnalandlmnalandericlauericlaumballenwp1mballenwp1chen-joshchen-joshjoshhoegenjoshhoegenhrechthrechtdiegodisantdiegodisantmoodypmoodypfransandifransandinikki.brimmernikki.brimmerdwuandjunedwuandjunezhoyoyozhoyoyoelenalaceyelenalaceydkaodkaostevethedevstevethedevbenjamin.djangbenjamin.djangamayaverdeamayaverdelindojlindoj

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)