I was editting the wrong filename...
Tags: beginners, programming, vscode, webstorm
Published: 2021-06-09 02:06:59


*I begin my series of problems and things that have stopped me and will stop me along my journey, I hope you have fun with my noob problems and don't think you are less intelligent for stopping with these things everyone has been a beginner and has stopped with this. \o/*

I'm writing this post on June 8th at 11:48 am and yesterday I had a big problem that made me crash for a few hours. The problem is that I'm still very noob (this isn't so bad depending on your perception) and I ended up getting stuck by bad luck (or luck) I dropped a task so I could solve a bug a form of one of the screens on the platform I'm on working currently, the problem is that in that file where the component I was refactoring was there was another component with the almost identical name, that was my disaster 😂.

![Frame 10 (1)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cv5ttd3oxqjkcvsfz8fg.png)
 
![image 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mkujckwasmlxfuc6jd3c.png)
 
The component itself was my component's mutation file, but since the name of the other mutation was almost the same, the chances of me getting confused were huge (and that's what happened). An important point is that the ide I was using didn't help me much, I say this because my superior solved the wrong import problem in less than 3 minutes (yes I confused and imported the other mutation and it made me mess up other files and refactor that it didn't was to refactor in the case at hand). Another point that was pointed out by him was to put another name on the mutation because I would get confused more with the name of the same component and mutation, so I passed it as ``JobExamQuestionAddM``.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d3zuliaxvoyoks48l4tb.png)
 
The tip I give is **USE AN IDE THAT HELP YOU** in these details that we do not pay attention to a good IDE can help you with automatic imports or you can do this just by clicking and seeing that what you are actually importing is right or if there is.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cso768isakcaawipes0g.png)
 
Here in this first image Vscode didn't help me much, as it didn't show that I was importing the wrong component and only showed a typescript error

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/543v1bye2pjueus2n89d.png) 

In this second image I'm using the Webstorm ide it pointed out that the import was wrong because I clicked on the component name in the import line and it didn't go anywhere, as shown in the image just placing the mouse over the name with correct import already shows that your component actually exists and is being used.

The second tip is **PAY ATTENTION TO WHAT YOU'RE DOING**, these silly lack of attention made me waste a lot of time and as I'm pretty noob at all I didn't know what I was doing, so it's extremely important to ask your coworkers for help they are more experienced and will give you clues to the possible solution.

*Thanks for your attention and stay tuned for the next issue post because it will definitely have several issues.*😂