Working with multiple Refs on React

Marcos Gonçalves
NERDJACKING
Published in
Aug 17, 2020

It is not as complicated as you might think

React & Multiple refs: easier than you think.

Say hello to #StraightToThePoint series

NERDJACKING is just launching the #StraightToThePoint series: short stories with no chit-chat, just pure hands on code.

On every story you will find smart code snippets that can elevate your coding experience and save you time to focus on what’s important.

Formulas

Typescript

ES6

Usage

API

mergeRefs(ref, localRef);

Real world scenario / Usage case

Playground demo

working with multiple references on React — playground

Got something on your mind? Let us know in the comments 💪

--

--

Marcos Gonçalves
NERDJACKING

Lead Engineer | Architect | Developer Advocate | 12+ years of experience. Also a lover of a good beer in his spare time.