React props best practice

It’s a best practice write ALL the component in props then asign the text in <App’>?
for example:
-I want my HTML looks like this:

So, it’s ok leave it like that?

or i have to use props like this?:

then write ALL the text in <App’> (principal React file) ?

Thanks in advance.

1 Like

I don’t see any reason for passing props to child component form its parent unless they are sharing the data or it’s part of state.

1 Like

Hey there,

I would try to keep the complexity of your project as low as possible.

If you need data in one component,
don’t couple it to another component.

In your case, if you want to have your texts in one place,
e.g. to create some translations later
I would create a file dedicated for this purpose.
But this also increases the complexity of your app,
so you have to think about the trade-offs.

Nice poem thou wrote :wink:

1 Like