3.4.100 • Published 10 months ago

@patrtorg/vero-sed v3.4.100

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

10 months ago

3.4.99

10 months ago

3.4.98

10 months ago

3.4.97

10 months ago

3.4.96

10 months ago

3.4.95

10 months ago

3.4.94

10 months ago

3.4.93

10 months ago

3.4.92

10 months ago

3.4.91

10 months ago

3.4.90

10 months ago

3.4.89

10 months ago

3.4.88

10 months ago

3.4.87

10 months ago

3.4.86

10 months ago

3.4.85

10 months ago

3.4.84

11 months ago

3.4.83

11 months ago

3.4.82

11 months ago

3.4.81

11 months ago

3.4.80

11 months ago

3.4.79

11 months ago

3.4.78

11 months ago

3.4.77

11 months ago

3.4.76

11 months ago

3.3.76

11 months ago

3.3.75

11 months ago

3.3.74

11 months ago

3.3.73

11 months ago

3.3.72

11 months ago

3.3.71

11 months ago

3.3.70

11 months ago

3.3.69

11 months ago

3.3.68

11 months ago

3.3.67

11 months ago

3.3.66

11 months ago

3.3.65

11 months ago

3.3.64

11 months ago

3.3.63

11 months ago

3.3.62

11 months ago

3.3.61

11 months ago

3.3.60

11 months ago

3.3.59

11 months ago

3.3.58

11 months ago

3.3.57

11 months ago

3.3.56

11 months ago

3.3.55

12 months ago

3.3.54

12 months ago

3.3.53

12 months ago

3.3.52

12 months ago

3.3.51

12 months ago

3.3.50

12 months ago

3.3.49

12 months ago

3.3.48

12 months ago

3.3.47

12 months ago

3.3.46

12 months ago

3.2.46

12 months ago

3.2.45

12 months ago

2.2.45

12 months ago

2.2.44

12 months ago

2.2.43

12 months ago

2.2.42

12 months ago

2.2.41

12 months ago

2.2.40

12 months ago

2.2.39

12 months ago

2.2.38

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