79191197

Date: 2024-11-15 05:38:02
Score: 1
Natty:
Report link

You add a videos property to App component,but it isn't a wise way to solve your problem.If you do this,then your App component may extend more properties as your project expands.You'd better think how to solve problem in a better way no just solve it by anyway,it means you did't master it,just cover it.

Your fake data may comes from API or other source, so you could set state in your App component.

// set exampleVideoData2 as intial value
this.state = {
  videos: exampleVideoData2
};

// in element
<div><h5><VideoList videos= { this.state.videos }/></h5></div>

And you can extend it by get it in some lifecircle(depends on your function).

Reasons:
  • Blacklisted phrase (1): how to solve
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: d1zzzy