New course! Every coder should learn Generative AI!
Try a free lesson0
Hi there, As you know javascript is a losely typed language. React is just a library for javascript. So, To pass an array in a component.
<SomeCoolComp arr={this.state.arr}/>
Whre, this.state={
arr:[]
}
Obviously, you will update this state with some value or you can just do "this.props.arr".
This would work fine with react.