How to get the true data type of an element

Making JavaScript “typeof” work: how to get the true data type

Say hello to #StraightToThePoint series

NERDJACKING #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

typeOf({}); // "object"

Real world scenario / Usage case

Playground demo

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

--

--

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

Marcos Gonçalves

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