Whats the point of the Home.js file and home class?

Hi there,

This file Home.js with the class Home is not being used anywhere in the output render. Whats it for?

import React from 'react';
import ReactDOM from 'react-dom';
import { Welcome } from './Welcome';

class Home extends React.Component {
  render() {
    return <Welcome name='Ludwig van Beethoven' />;

  <Home />, 

Would much appreciate any clarity on this …

Thank you.

Can you share the url of the exercise?

uhm… home is being rendered:

  <Home />, 

Thanks for the reply…

The url is

Yes Home is being rendered to ‘app’ but so is App in the final exercise, and changing the name to Wolfgang Amedeus Mozart has no effect because (as I understand it) Home is not being exported or called in the other components in anyway.

So i guess what i really want to understand is that is there anyways these compenents exchange conditional data( or are supposed to) with each other than through ‘export’ and ‘import’? … For instance by a

ReactDOM.render("**Component**",document.getElementById('**to same app**')

call in two discrete files?

Apologies if this is a bonafide silly question :slight_smile:

the confusing thing here is that the exercise provides two files (Home and Welcome) with examples, and 2 files (Greeting and App) you actually need to work on. In essence, you have two apps here.

and it seems the example files do not render, although normally they would. Home would normally render fine.

this is not really common, but the exercise felt the need to provide an example it seems.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.