Why not show all of the code required for each lesson?

Tell us what’s happening:
Describe your issue in detail here.
Why not show all of the code necessary to make a lesson run so we learn all that needs to be written for projects when outside of FCC?

  **Your code so far**

const ChildComponent = () => {
return (
  <div>
    <p>I am the child</p>
  </div>
);
};

class ParentComponent extends React.Component {
constructor(props) {
  super(props);
}
render() {
  return (
    <div>
      <h1>I am the parent</h1>
      { /* Change code below this line */ }


      { /* Change code above this line */ }
    </div>
  );
}
};
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36

Challenge: Create a Component with Composition

Link to the challenge:

Hi @TomDoRecife !

I think that the main reason why freeCodeCamp decided not to start off beginners with all of the code needed to create a react application is because it might be overwhelming at first.

There are a lot of files included in building react applications and it might be a lot to deal with in the beginning.

It is important to learn about all of that stuff and it is covered in the React JS Course for Beginners - 2021 Tutorial - YouTube.

But when you are first starting it is easier to focus on the core concepts of react.

If you wanted to create your own react application you basically have two options:

  1. use create-react-app
  2. build out your react applications without using create-react-app

Create-React-App
This is popular way to get setup with a new react application.
As long as you have node installed, then you can run a couple of commands in the command line which will create all of the starter files for a new react app.

Building a react app without CRA
The second option is to build your app and create all of the react starter files yourself.
This is a pretty good guide on how to do that.

That’s my two cents on it :grinning:

3 Likes

Thank you for the reply the information about Create-React-App is particularly helpful.

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