How to render multiple components within a parent component

0 votes
Can i know How to render multiple components within a parent component?
Mar 21 in Node-js by Nidhi
• 12,580 points
73 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 Mar 21 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,558 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
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 Mar 21 in Node-js by Anvi
44 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to manage state within a React component?

In React, state is managed differently in ...READ MORE

answered 5 days ago in Node-js by anonymous
36 views
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