Answer the question
In order to leave comments, you need to log in
Which is better: a standalone child component or passing props from the parent?
List component and sub-components of list items.
To display an element, you need to get the address of its image from the third service by an asynchronous request.
The list of elements is known immediately upon loading. Plus, elements in the list can be dynamically added by the user.
Who is responsible for uploading images?
I see two options:
Answer the question
In order to leave comments, you need to log in
IMHO option 1, so your child component will depend only on props, and not have any other dependencies, which will have a positive effect on testability and the possibility of reusing this component.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question