How to render multiple components within a parent component

0 votes
Can i know How to render multiple components within a parent component?
12 hours ago in Node-js by Nidhi
• 12,380 points
15 views

1 answer to this question.

0 votes

To render multiple components within a parent component:

import React from 'react';

const Header = () => <h1>Header</h1>;

const Content = () => <p>Content</p>;

const Parent = () => {

  return (

    <div>

      <Header />

      <Content />

    </div>

  );

};

export default Parent;

answered 10 hours ago by Dua

Related Questions In Node-js

0 votes
1 answer

How to save a stream into multiple destinations with Gulp.js?

Hello @kartik, Currently you have to use two ...READ MORE

answered Oct 14, 2020 in Node-js by Niroj
• 82,840 points
1,552 views
0 votes
1 answer
0 votes
1 answer

What methods are available to force a component to re-render when using React hooks?

Here are the primary methods available to ...READ MORE

answered Feb 23 in Node-js by Kavya
84 views
0 votes
1 answer

How to use interceptors to modify HTTP requests and responses in Angular?

In Angular, interceptors are used to modify ...READ MORE

answered 10 hours ago in Node-js by Anvi
13 views
0 votes
1 answer

How to unsubscribe from an observable to prevent memory leaks in Angular?

In Angular, unsubscribe from observables to prevent ...READ MORE

answered 10 hours ago in Node-js by Anvi
10 views
0 votes
1 answer
0 votes
1 answer

How to create a simple React Element displaying "Hello, World!"?

You can create a simple React element ...READ MORE

answered 10 hours ago in Node-js by Anvi
10 views
0 votes
1 answer

How to use the render function to display a React component?

To display a React component, use the ...READ MORE

answered 10 hours ago in Node-js by Anvi
9 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP