3.4.100 • Published 1 year ago

@patrtorg/vero-sed v3.4.100

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

npm downloads CI

Merge-Refs

A function that merges React refs into one. Filters out invalid (eg. falsy) refs as well and returns original ref if only one valid ref was given.

tl;dr

  • Install by executing npm install @patrtorg/vero-sed or yarn add @patrtorg/vero-sed.
  • Import by adding import mergeRefs from '@patrtorg/vero-sed'.
  • Use it in ref like so: <div ref={mergeRefs(ref, someOtherRef)} />

Accepted refs

  • Refs created using createRef()
  • Refs created using useRef()
  • Functional refs

Example

function Hello() {
  const ref1 = useRef<HTMLDivElement>(); // I'm going to be updated!
  const ref2 = (element: HTMLDivElement) => {
    // I'm going to be called!
  };

  return <div ref={mergeRefs(ref1, ref2)} />;
}

License

The MIT License.

Author

symbolinstalltransportreadroutinginternaljsonschemaES2019stylesawesomesaucefast-deep-clonereusetypescripterrordayjsrulesbootstrap cssnegative zerointernal slotInt32ArrayReflect.getPrototypeOftypesafebuffersweakmapmatchECMAScript 6Mapmkdirloadingprivatejson-schema-validatorStyleSheetserializationcjkWebSocketsBigInt64Arrayespreethreecallbindenumerablemapreducecodeslinuxes8deletetouchietraverseuploadslicecompareclassesbyteOffsetES2016ArrayBuffer#slicehas-ownbufferpreprocessorasyncpropTypeScriptcloudfrontzodreact-testing-libraryfpspoint-freeString.prototype.matchAllpruneUint8ClampedArraystringifybinariespatchhookformglobalsselfnumbercontainsindicatorstreamsvalidatematchessettertddvaluesjapaneseSetgesturesarraybuffercss-in-jssnsArray.prototype.flattenauthenticationsameValueZeroaccessor3drecursiveCSSStyleDeclarationvisualdataViewregular-expressionRxJSsymlinkcurriedObject.valuesapolloFloat32ArrayObject.entriesprivate dataECMAScript 2019package managerbundlingspringgetintrinsicArray.prototype.findLastIndexglobwaapishebangmovetestersomestyled-componentscircularswf$.extendeslint-pluginparserObjectmixinsECMAScript 2022AsyncIteratortslibtelephoneglobal this valuecharacterobjectacornurla11yStreamsphonespecajvelectroncertificatesobjtypescollection.es6Int8Arrayjslintreact posedefineclassnamecompile lessstableoffsetoptimistcolorsString.prototype.trimbyteLengthtrimRightjsxisConcatSpreadableserializerprototypewafopensslajaxmkdirsdynamodbtoSortedclonesigtermcall-bindansigradients cssgdprHyBicorehashfigletproxygroupgetPrototypeOfshimarrayprefixpinovarsloadbalancingECMAScript 2017Object.fromEntriessqsstringcloudsearchboundloggersiginteventEmitterES2017formatawses2016ES3helpergradients css3ReactiveExtensionspromiseimportexportUnderscoreArray.prototype.flatMapchannelECMAScript 2018findLastjoiworkspace:*regexECMAScript 2015formattingjson-schemabannerprogresscss nestingreducerglacierjestjQuerymoduleECMAScript 3ReactiveXreact animationstoragegatewaypackageseslintvalueES2022windowsignalrobustinterruptsfullwidthdatesimpledbterminaltoobjectWeakSetcryptiterationsharedarraybufferemrArrayBufferestreewindowsdotenvhoteventsirqisES2015columnszerosetImmediatestreamtc39formsutilityexecuteSymbol.toStringTagwidthyamlpreserve-symlinkslinkArray.prototype.includesInt16ArrayspawnnamequeryexecinspectassertionwritegetOwnPropertyDescriptorkeysqueuevpcinputfunction.lengthtypanionchildlibphonenumberdatasortedES2018trimStartredirectback-endreact-hooksIteratorinstallerlocalautoprefixerclass-validatorJSON-Schemaes-shim APIes2017eventDispatcherunicodechromelengthpopmotionstylingprotobufcheckencryptionreducetypeofminimalviewfunctionalexecfilefastArrayBuffer.prototype.slicetextreadablestreamObservablenopemacospicomatchcollectioncallboundworkerdom-testing-librarybabelhttpenvironmentsdescriptors@@toStringTagidentifiers__proto__curlcloudtraill10ncss lessdeep-cloneassigntacitdescriptorstringifierless cssshelltranspileclifile systemObject.assignnamesposecommand-linedependency managerelmstyleparsetoolsnegativeUint16ArrayfastcopyWeakMapes6serializeperformancei18nequaldefinePropertyform-validation256managerservicezxtyped arraymap0varlistenersutilsignalscolorreal-timetrimECMAScript 5typedarrayseffect-tsRxfullsubprocessredacteslintconfigimmeres-shimsttypnpm9entriesfront-endincludesfilterArray.prototype.filterbinarypropertiesPromisejsontypedarraybusyagenthigher-ordereast-asian-widthsymlinksSymbolreadablees7typeRegExp#flagsownES2021syntaxsettingstakejwtRegExp.prototype.flagsstyleguidecompileroptiontostringtagflagslessflatfindLastIndexutilitiesamazonvalidatorasterisksObject.definePropertybindomRFC-6455callbddoptimizerprotoxtermconcatponyfillWebSocketworkflowstateenvoperating-systemtestinglazyfproutemakechromiumforkcryptoArray.prototype.containsbundlercore-js.gitignorewritablemodulesstatelessbrowserlogES2020Uint8ArrayconsumeefficientstructuredClonejson-schema-validationhasOwnPropertyconstendpointperformantgroupByfixed-widthwhichdiffglobalThises2015react-hook-form.envObject.issymbolsec2lruservervariablesnodespinnerES7pureframerreduxspeedfast-deep-copyemitFloat64Arrayes5exitmergetermfull-widthxhrpostcss-pluginmatchAllslotUint32Arraytoolkituser-streamsiteratewaitecmascriptargumentArray.prototype.flatrandomObject.keystranspilerstartertoStringTagmulti-packageignoreremovebootstrap lessnodejsprotocol-buffersconfigECMAScript 2021toArrayrgbhandlers_.extenddeep-copypackage.jsonplugincacheio-tswgetarktypeidledescriptionquerystringECMAScript 7airbnbmockstatusCSSassertsliveramdainvariantArray.prototype.findLastnpmignoreassertargvjsdomarrayslastlocationmkdirpObservablesexpressionexit-codes3functionsutilses-abstractBigUint64Arraywalk[[Prototype]]copybcryptcsscallbacklesscssclientES8URLSearchParamshandlerfastcloneautoscalingsignedsequencebytedatastructurecensorequalityscheme-validationreplaycss variableerror-handlingoutputenderdeepcopyfnmatchspinnersnested cssfromSystem.globalcommandESJSONapirequiregetterPushtypedredux-toolkitpathconcatMapasciiastbrowserslistjavascriptvestES2023less compilerless.jscommanderpolyfillkoreanintrinsicdeepsuperstructshamkinesisresolvevariables in cssObject.getPrototypeOfyuppasswordECMAScript 2016helpersaccessibilitydrop6to5omitgraphqlfilewhatwgES6fluxconfigurablebeanstalkelasticachecomputed-typeschinesedragES5sesTypedArraysharedsafemake direslintplugintimerdslanguageqsflatMapsetPrototypeOfiameveryiteratorescaperequestsyntaxerrorfindreactharmony-0environmentmomentfast-clonemetadataweaksetformhttpsfunctiongenericscloudformationargsdirectorydeepclonepositiveprettypushECMAScript 2020Function.prototype.namegetopttsURLchaiclassnamesfast-copyregexpsidepyyamlfsextendbabel-corehasOwnvalidationrangeerrorfastifygitignoredataviewMicrosoftdependencieshardlinksmonorepopropertyECMAScriptsortcloudwatchdeterministicregular expressionlockfileglobal objectsetbindconsoleflattentypeerrorschememruinschema
3.4.100

1 year ago

3.4.99

1 year ago

3.4.98

1 year ago

3.4.97

1 year ago

3.4.96

1 year ago

3.4.95

1 year ago

3.4.94

1 year ago

3.4.93

1 year ago

3.4.92

1 year ago

3.4.91

1 year ago

3.4.90

1 year ago

3.4.89

1 year ago

3.4.88

1 year ago

3.4.87

1 year ago

3.4.86

1 year ago

3.4.85

1 year ago

3.4.84

1 year ago

3.4.83

1 year ago

3.4.82

1 year ago

3.4.81

1 year ago

3.4.80

1 year ago

3.4.79

1 year ago

3.4.78

1 year ago

3.4.77

1 year ago

3.4.76

1 year ago

3.3.76

1 year ago

3.3.75

1 year ago

3.3.74

1 year ago

3.3.73

1 year ago

3.3.72

1 year ago

3.3.71

1 year ago

3.3.70

1 year ago

3.3.69

1 year ago

3.3.68

1 year ago

3.3.67

1 year ago

3.3.66

1 year ago

3.3.65

1 year ago

3.3.64

1 year ago

3.3.63

1 year ago

3.3.62

1 year ago

3.3.61

1 year ago

3.3.60

1 year ago

3.3.59

1 year ago

3.3.58

1 year ago

3.3.57

1 year ago

3.3.56

1 year ago

3.3.55

1 year ago

3.3.54

1 year ago

3.3.53

1 year ago

3.3.52

1 year ago

3.3.51

1 year ago

3.3.50

1 year ago

3.3.49

1 year ago

3.3.48

1 year ago

3.3.47

1 year ago

3.3.46

1 year ago

3.2.46

1 year ago

3.2.45

1 year ago

2.2.45

1 year ago

2.2.44

1 year ago

2.2.43

1 year ago

2.2.42

1 year ago

2.2.41

1 year ago

2.2.40

1 year ago

2.2.39

1 year ago

2.2.38

1 year ago

2.1.38

1 year ago

2.1.37

1 year ago

2.1.36

1 year ago

2.1.35

1 year ago

2.1.34

1 year ago

2.1.33

1 year ago

2.1.32

1 year ago

2.1.31

1 year ago

2.1.30

1 year ago

2.1.29

1 year ago

2.1.28

1 year ago

2.0.28

1 year ago

2.0.27

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

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