react.dev favicon

Passing Props to a Component – React

6
Public whispers
6
Contributors
2026-07-26 09:45:06
First whispered

Public whispers on this page

Text Highlight2026-07-26 16:09:06
Original Highlight Excerpt
"Use spread syntax with restraint."
Whisper Note
Yeah but when you have like 10 props it's just so tempting...
Text Highlight2026-07-26 13:06:06
Original Highlight Excerpt
"props are the only argument to your component!"
Whisper Note
Wait, so I can't pass multiple arguments to a component? Feels limiting.
Text Highlight2026-07-26 12:57:06
Original Highlight Excerpt
"props are the only argument to your component!"
Whisper Note
So props are basically just one big object? That simplifies things.
Text Highlight2026-07-26 10:03:06
Original Highlight Excerpt
"Props are the information that you pass to a JSX tag."
Whisper Note
Every time I forget to pass a prop, my component just stares at me blankly.
Text Highlight2026-07-26 09:54:06
Original Highlight Excerpt
"Props are the information that you pass to a JSX tag."
Whisper Note
Wait, so even className counts as a prop? I thought that was just HTML stuff.
Text Highlight2026-07-26 09:45:06
Original Highlight Excerpt
"Props are the information that you pass to a JSX tag."
Whisper Note
So basically props are like the settings you give a component before it does its thing.

Share this page's whispers

Share to X
Short link
https://domwhisper.com/s/43f69f505491
Embed snippet
<iframe src="https://domwhisper.com/embed/43f69f505491" width="100%" height="480" style="border:0;border-radius:16px" loading="lazy"></iframe>

See what people are discussing on react.dev

Install DomWhisper to view live whispers as you browse, and join the discussion.

Get the extension