The week has come to an end, a lot of self-reflection has been done during this week. Let’s examine the takeaways.

As mentioned last week, I had been struggling to solve an issue in the Material UI, but I wasn’t making much progress due to having issues with understanding the way different React hooks worked and interacted with each other. After that I decided to look for help and fully commit to this repository on Tuesday and Wednesday. The result? A lot of frustration, little progress made on fixing the issue, but a lot of insight and perspective into the direction, progress and pitfalls I currently have, which will help me to better direct my efforts in the coming weeks.

Let’s start analyzing the issue itself and what insights I was able to gather. The Tree View component takes advantage of the UseContext hook in order to provide general properties to all of the descendants of the tree without needing to pass them as props. This context provider itself uses the hook UseMemo in order to keep a record of the information recorded in the tree. This is all good, the problem comes from the fact that somewhere along the line, hooks are only updated if the items’ content changes, so changing their index (such as in sorting) does nothing to the tree, which means that while the UI is updated, the indexes are not. This much I am sure of, as I’ve been able to solve the issue by modifying at least 1 character of any one of the items in the tree, as this then triggers a change detection and fixes the indexes. At this point and after 2 days of trying and failing, I reached a realization: I don’t fully understand nor trust in my ability using hooks in React. This was hard for me to accept, but in retrospect, it was true. Until now, I’ve been able to get around with the basic hooks (UseState and UseEffect), and while understanding and using these is absolutely essential to using React, I believe I won’t get as far or understand as much as I want unless I study this topic more in depth. Maybe I bit a bit moer than I could chew, but I believe this was a good realization to make at this moment in my career. As such, I decided to get a complete React course which I plan on working on over the next couple of weeks. I’ve just started with it, but so far, it looks very promising, and at the very least I am extremely comfortable with the foundational theory and concepts behind React.

Aside from that, this week I continued learning about Angular, this time by starting a small project based around the Spotify API in order to make a little music player app. So far, I’ve learned about API authentication and the [Http Client Module](https://angular.io/guide/http) in order to communicate with said API, as well as using the tool json2ts in order to easily generate interfaces for the API responses. Other than that, I’m still getting the hang of the framework, and while I am aware that at this point of my career, I must not get stuck with any given framework, I am starting to really like working with Angular, and whatever happens I hope to keep learning how to better use it.

And that would be all for this week, let’s hope for the best this upcoming one!

Angular_and_React