Why copying tutorial projects does not help you to learn React
Tags: react, codenewbie, tutorial, beginners
Published: 2021-10-13 06:13:31

One year ago I needed React for a Project at work. I have wanted to learn it before, but I never had the time to do it. Now the time has come and I decided to dive deeper into web development with the React framework.

First of all I decided to watch some tutorials on YouTube because that's what you usually do when learning new programming things.

> ![screenshot of youtube tutorials](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jdrkx3qj0n7ch6heltf.PNG)
> Fig.1 - YouTube search results for React Tutorials

My first decision was a very informative tutorial by [DevEd](https://www.youtube.com/watch?v=pCA4qpQDZD8) where he shows how to develop a simple to-do app.
After that, I watched more and more tutorials and copied their projects.

**In my opinion that was not the best start I could have had. By just copying and following a tutorial, you do not learn the basics. It would be better to learn concepts and understand how the framework itself works than just copy lines of code.**

<br>

## Comparison

### Todo App

My first ever React project.
Obviously not only mine.

> ![todo app by Chirag](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gqikqm8n9l6ie8gx5dh8.PNG)
> Fig.2 - TodoList by [Chirag](https://chiragsaini.github.io/Todo-List/)

<br>

> ![todo app by Auxfuse](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dgud54gthnp9ne9viv7.PNG)
> Fig.3 - TodoList by [Auxfuse](https://auxfuse.github.io/todoR/)

<br>

> ![todo app by mine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bbbkqssbz7y69xexh6db.PNG)
> Fig.4 - [My version of the TodoList](https://todos.tim0-12432.me/)

As you see, the difference between the compared screenshots of to-do apps is not wide.
Even if I conquered my weaker self and extended the feature set, it seems like they are a one to one copy of each other. No wonder.

### Corona Tracker

In Covid-19 pandemic, I wanted to create a page where I can find all important key numbers for Germany.
For that I followed a tutorial by Javascript Mastery and extended it.

> ![corona tracker by Javascript Mastery](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5p5nz3n9cy9utft0j2u6.PNG)
> Fig.5 - Corona Tracker by [JavascriptMastery](https://covid19statswebsite.netlify.app/)

<br>

> ![corona tracker by Mine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p6y5cyyxy1727erhx2al.PNG)
> Fig.6 - [My version of the Corona Tracker](https://covid.tim0-12432.me/)

The difference is a bit wider than in the above example. Most likely because of the added dark mode (#hateAgainstLightMode xD). But with a closer look you can see the components are very similar.

## Better approach

1. Search for a good project at the skill level that suits you
2. Implement the idea in the way you image it
3. Search for solutions or best practices on the internet whenever you don't know how to achieve a certain behavior, or you want a better way of implementation
4. As a sideline you can watch videos explaining little concepts such as states, context and so on

## Conclusion

For a first entry point to learning a new framework or language, it could help to copy a tutorial and enhance it a bit afterwards.
But after copying one or two projects, copying does not lead you to getting better, learning the technique really or understanding basic principles.
**Try to write code yourself.**

<br>

---

*Please feel free to write your opinion in the comment section!*
{% user tim012432 %}
- GitHub: [tim0-12432](https://github.com/tim0-12432)