DEV Community

Cover image for RFC: Call React component state variables "statelings"
Better Coding Academy
Better Coding Academy

Posted on β€’ Edited on

6

RFC: Call React component state variables "statelings"

I've been a professional web developer for just over 10 years now. I'm currently the lead web development instructor at Better Coding Academy, and as part of what I do, I post videos on our YouTube channel at https://www.youtube.com/c/BetterCodingAcademy.

(Subscribe for awesome web development content!)

I was talking with one of my students, and he asked me this question regarding React:

Hmm...
What do you call the things that exist inside state={}
Statelings?

It totally caught me off guard.

For those of you who don't know, the "proper" name is state variables, but personally I'm ever so slightly biased towards statelings.

What do you guys think? 😁

Top comments (2)

Collapse
 
dance2die profile image
Sung M. Kim β€’ β€’ Edited

I've been calling them as:

For class components (CC), "state properties", for function components(FC), "states" as you can have one state variables in CC while multiple (via hooks) in CC.

I will refer'em both as state variables from now on :)

Collapse
 
metruzanca profile image
Samuele Zanca β€’

CompletelyuUnrelated but when ever i hear the word -ling I always thing of Ling Yao.

I've always just referred to those vars as state variables. Tho stateling would definitely turn some confused heads.

Neon image

Next.js applications: Set up a Neon project in seconds

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Get started β†’

πŸ‘‹ Kindness is contagious

Dive into this thoughtful article, cherished within the supportive DEV Community. Coders of every background are encouraged to share and grow our collective expertise.

A genuine "thank you" can brighten someone’s dayβ€”drop your appreciation in the comments below!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found value here? A quick thank you to the author makes a big difference.

Okay