score:0

// Header component

const Header = () => {
  // ... your logic
  return (
    <ImageList myProp={query} />
  );
}

// ImageList component
const ImageList = ({ myProp }) => {
  // now you can use myProp inside this component
};

score:0

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.production.min.js"></script>
<div id="react"></div>

Related Query

More Query from same tag