useRef - For My Code and Life

useRef - For My Code and Life

Last week, Leisel and I were in Italy.

It was one of those weeks that felt like a month. We had an amazing time. IMG_5220.jpeg

Now that I’m back, this week has been about assessing my current state, connecting with others regarding opportunities and directions, and strategizing how to move forward in my coding journey.

I’m working on wrapping up my project with Hearts You Hold. Specifically, I’ve updated our nodeMailer code to use OAuth2 to comply with gmail’s new requirements and added a clear button for my filters.

I found a helpful tutorial for the OAuth2 process, and using a button to reset my state to all the categories was easy enough. Getting the filters to return to their generic “category” and “state” labels, however, proved to be a bit tricky.

My clear button would re-render the page to show all the items, but “Vermont” and “Clothing,” for example, would still show up as selected options in the filter fields. Screen Shot 2022-05-20 at 9.05.43 AM.png

I tried everything I could think of to re-render the component, but was not having any luck until I stumbled upon an article about impacting the selectedIndex. I was able to use the useRef hook to reference my select element. Once I was able to grab both filter bars, I could use my clearFilters function to reassign my selectedIndex. code2.png

code.png

My clear button now resets all the item cards and resets my section options! Woohoo! Screen Shot 2022-05-20 at 9.06.17 AM.png

Using a reference has been a reality in my life, along with my code, this week.

I’ve been in contact with friends, teachers, and mentors to discuss opportunities and the simple but seemingly monumental decision about what I should do next.

I’m working to find my next mountain and start taking the steps towards it.

In hiking, I can easily visualize a summit.

This weekend we’re starting another goal: hiking all the 4,000ft peaks in the Northeast. There are 115ish on the list.

We’ve hiked a number of them on the Long Trail and the AT, but we’ve decided to start from 0. Some mountains will be repeats, while others will be completely new experiences. I’m excited to get out and explore. IMG_2230.jpeg

But for this dream to be realized, I have to do a number of things other than stand on a summit.

I have to figure out where the mountains are, what gear we need, and how to match our time and energy with collecting the mountains in the most efficient way possible.

The summit pictures and feeling of accomplishment are what drive me, but the journey to get there is required and also fun.

My summit for my coding journey is still to become a developer.

I’ve done a good amount of leg work while attending my bootcamp, but I still have technology to learn, people to meet, and steps to take before I reach my goal.

I’ve taken some pretty exciting steps this week to solidify what the next few months of my life will look like, and I’m excited to see where this summer takes me in regards to coding and climbing mountains! IMG_2461.jpeg

Well, I’m off to climb some mountains.