Open thetillhoff opened 2 months ago
On section for Nesting components, there's the following code snippet:
function Header() { return <h1>Develop. Preview. Ship.</h1>; } function HomePage() { return ( <div> {/* Nesting the Header component */} <Header /> </div> ); } const root = ReactDOM.createRoot(app); root.render(<Header />);
As it is, the components are nested, but the wrong one is then rendered. It should be root.render(<HomePage />); instead.
root.render(<HomePage />);
... Just read on with the next chapter, which then tackles that part. But, I think it would make sense to add a Sentence at the end along the lines "How to use that new component is described next."
On section for Nesting components, there's the following code snippet:
As it is, the components are nested, but the wrong one is then rendered. It should be
root.render(<HomePage />);
instead.