Is props short for "properties"?

Question

In the context of this lesson, is props short for “properties”?

Answer

Yes, props is short for the word “properties”.

One possible reason for this naming is that props are essentially JavaScript objects, and JavaScript objects contain properties. Furthermore, when we pass props from a component to a child component, the props are sent as an object containing the “properties” of the component.

1 Like

Note that while in the context of React this might indeed be an abbreviation of property, only Jordan Walke or some React core developer will give you the very initial intend here.

Indeed, “prop” is a word by itself in Engilsh. The Wiktionary defines it as " An object placed against or under another, to support it; anything that supports.", which ultimately comes from Danish prop (“plug, stopper”) — that is not as an apocope of “properties”.

While this might be a simple coincidence, the meaning could be considered relevant.

1 Like

Digging a bit further, actually the official documentation explicitely tells:

This function is a valid React component because it accepts a single “props” (which stands for properties) object argument with data and returns a React element.

So the answer to the question is “very officially yes”.

You remain free to interpret “prop” with the meaning of its stand-alone word of course. :smiley:

1 Like

So do props always follow a top-to-bottom data flow, or could it also follow a different direction of bottom-up?

So why not just call them properties then? I personally find unnecessary abbreviations confusing as I have to ‘translate’ the word into something that makes more sense or is meaningful in it’s context. There seems to be a lot of that in React from what I’ve seen so far, unnecessary renaming of things or using of buzz words to make it sound ‘cool’. Just call a spade a spade.

I agree, I found myself lost after reading this word for the first time. I didn’t know what prop was until deep in the topic. So, it’s initially something impractical to understand at first sight

1 Like