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

79

Maintainers

benjamin.djangbenjamin.djangjondavenportwapojondavenportwapomarcostarafwashpostmarcostarafwashposttab00tab00alvaror2walvaror2wclau8aclau8ajosevazqueznpmjosevazqueznpmvithalanisvithalanistomkaz-wapotomkaz-wapogiomarwizegiomarwizeflaviopsantannawapoflaviopsantannawapovladimirjvvladimirjvjmiguelfloresgjmiguelfloresgkarklislkarklislallidinatallidinatalvarovalinoalvarovalinotawaddytawaddyfernandowzfernandowznikki.brimmernikki.brimmermoodypmoodypdiegodisantdiegodisanthrechthrechtmalocuevimalocuevichen-joshchen-joshericlauericlaumaimaimai-bitmaimaimai-bitlmnalandlmnalandmballenwp1mballenwp1hannah.goodhannah.goodgregmanifoldgregmanifolddnparmardnparmarcatherine1234catherine1234dev-javudev-javuvviswavviswanetolm-wpnetolm-wpharmanwapoharmanwapolpadillac4slpadillac4scashackcashackjoshhoegenjoshhoegenalefkowalefkowysmildeysmildeshrddhawashpostshrddhawashpostkarenwangkarenwangcarsonologycarsonologyyuyanleiyuyanleidbnappdbnappcolemanc4colemanc4stevethedevstevethedevdkaodkaoelenalaceyelenalaceyzhoyoyozhoyoyodwuandjunedwuandjunefransandifransandiashendrukashendrukmichaeldominemichaeldominemark-a-wapomark-a-waposabrinamochisabrinamochijorgemhc-devjorgemhc-devcarlyncarlyndgreen19dgreen19josephjamesjosephjamesniko_komniko_komnicrocsnicrocsavalbuenaavalbuenasotojlsotojlhaileyhaymondhaileyhaymondlukaskeelwapolukaskeelwapotimborisenkotimborisenkokt-prrykt-prryjesse.post.washpojesse.post.washpothreeteaspoonsthreeteaspoonsluciovillaluciovillatam.stephtam.stephagillespieagillespieani512ani512vonoehsenevonoehseneemmakumeremmakumeraggyjleeaggyjleelavanderoilavanderoiemily.engemily.englmelgarlmelgarsadbumblebeesadbumblebeejanicekchenjanicekchenjamelhendricksjamelhendrickscrunchwrap78crunchwrap78welchkwelchkval-l-hoslerval-l-hoslernick.mourtoupalasnick.mourtoupalasbenjakibenjakibattandbattandjon.rosadojon.rosadojacknugent27jacknugent27asamireissaasamireissacourthcourthmahigmahigjchaskelljchaskelllorenzoglorenzogln-washpostln-washpoststericsonstericsontalpert022talpert022gengelgengeltuckabelletuckabellenauticaharvinnauticaharvinaadittambeaadittambenatalievinebergnatalievinebergkrbrookskrbrookskatty-huertaskatty-huertasmariaalconadabrooksmariaalconadabrooksjuniorh28juniorh28atomictangerineatomictangerinehelmschelmsctriticotriticopranavganorepranavganoredanacasidydanacasidyterrywpterrywpksemanur8ksemanur8dreyvitserdreyvitsermvoneshmvoneshchelseaconradchelseaconradarnolda-wparnolda-wphermionewyhermionewywp-abergwp-abergsheamus-heisheamus-heihaysstephaniehaysstephaniebroadwaternebroadwaterneandrevincandrevinckat-alokat-alodaniellersauldaniellersaulstevefuenteswpstevefuenteswprekha26rekha26marcnahedmarcnahedamiemunozamiemunozmartinezymartinezyseanwaposeanwapoducroquetducroquetjakekarajakekarajtotoolejtotoolemjperalesmjperalesarturgalochaarturgalochaebgrangerebgrangerramyalamatiramyalamatiadamsrobwadamsrobwluke.connorsluke.connorswrneffwrneffmcdohmcdohfloresafloresataliatrackimtaliatrackimlennybronnerlennybronnerbitsoglassbitsoglassit_procurementit_procurementdavidchaiwapodavidchaiwapomaddoxnelsonmaddoxnelsonstephanie.clarkstephanie.clarkjasonvuongjasonvuongjkoo87jkoo87kankelcrkankelcrgregoryauld2014gregoryauld2014uncompileduncompiledjbrown4jbrown4scarothersscarotherskhan.salauddinkhan.salauddinrowhawnrowhawnsubs-npm-buildersubs-npm-buildernealhumphreywaponealhumphreywapoashlynstillashlynstillptnielsenptnielsenleslie-sleslie-scourtney-kancourtney-kankevin.schaulkevin.schauljakecrumpjakecrumpmacallahmacallahjmuyskensjmuyskensmadisonwallsmadisonwallsdsantamarinadsantamarinaartmsilvaartmsilvaashtolashtolsberhanusberhanujjalcantarajjalcantaraalyssa.fowersalyssa.fowersjoemfoxjoemfoxreubenfbreubenfbcalcantaracalcantaraadrianblancoadrianblancochiquiestebanchiquiestebaniuraizeeiuraizeebdgrossbdgrossulmonicaulmonicabmferrillbmferrilldankeatingdankeatingtimmekotimmekokevinuhrmacherkevinuhrmachershellytanshellytanharrystevensharrystevenschrisrukanchrisrukanallisonnmannallisonnmannaaronsteckelbergaaronsteckelbergshruthagandlashruthagandlabrafordabrafordaadityajain15adityajain15linorabolinilinorabolinianthonyjpesceanthonyjpesce1313davidlee1313davidleekate.rabinowitzkate.rabinowitzfontcfontccecepascualcecepascualvsingarayarvsingarayararamzsaramzsruxkruxknader_heidarinader_heidarithompsond3thompsond3tylerremmeltylerremmeltmac0201tmac0201joemoore-postjoemoore-postealvarez79ealvarez79hdormidohdormidosgpottssgpottsyutaochenyutaochennwalker_wpnwalker_wpapbestapbestbriannaschroerbriannaschroershikha-subshikha-subnaemanaemachloemeisterchloemeisterjulia.ledurjulia.ledursolomonsscottsolomonsscottbetchavarriabetchavarriaeewrighteewrightnickkirkpatricknickkirkpatricktrann_wapotrann_wapotobefrankhjtobefrankhjessiekimessiekimsergio.pecanhasergio.pecanhameganwaltermeganwalteralyssabartuchalyssabartuchalexisbarnesalexisbarnesdmoriarty6dmoriarty6mokhtar.alimokhtar.alidpham5dpham5klimenkovdklimenkovddavisshaverdavisshaveraaronbrezelaaronbrezelkastningjkastningj

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)