'Passing an Array of Data stored in a variable from Home Component to Another Component

I have an array stored in variable called updatedData which i want to move it with the same informations to another functional Component. Can anyone please help!



Solution 1:[1]

you can do it with props like so:

function Welcome(props) {
  return <h1>Hello, {props.updatedData}</h1>;
}

const updatedData = [];
<Welcome updatedData />

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ruby_newbie