Week 9 Day 3 – More bonus features! … That break everything.
T_T
Yesterday, I worked on a functional feature, and a completely fun one! While one is considered a bonus feature, I felt it was a fairly obvious one to have – deleting comments. Fairly easy to implement, I simply added a button that when clicked, dispatches a delete comment request to the back-end. It was making sure that the state gets updated when that happens that’s the difficult part. Surprisingly, it worked out well.
The really fun feature I want to talk more about, is a image filter feature that I implemented mainly with CSS, as well as the node package classNames. Utilizing the ability to set state in React, i’m able to update whether or not a filter should be applied, which is REALLY cool, because I have a slider in my photos that allow for independent and real-time image filters. It’s not an impressive feature I think, but it’s a really fun one that I really enjoyed implementing.
After that, I spent the night working on implementing a modal. It looks promising so far, but i’ll update you guys tomorrow on that since tomorrow will be ALL modals.
My biggest bug yesterday was when a feature randomly broke. For some reason, it seems as if I was accessing the current user that was set to the window, so when the initial login doesn’t store the current user to the window until my page was refreshed, it broke a lot of the features relied on that logic. As a result, I had to go through my code to check where I tried accessing the window’s current user, and instead, used the session’s current user that was stored in state.
That’s pretty much it! I’ll talk to you guys tomorrow. I’m working on cleaning up my project, writing a production README and continuing with modals.