It all started with a fork! – My First Pull Request | Helpfulz

It all started with a fork! – My First Pull Request

April 17, 2019

So a piece of feedback that I’ve received from a few different interviews is that I should have some sort of “Open Source Pull Requests”, basically saying I should contribute to open source projects. For a number of other reasons, the ones I can highlight would be the experience of working with an online team and just that effort in total.

Well this can be a pretty stargerring objective to achieve as there are many open source projects and their contributing requirements can be demanding and finding ways to improve a project can take time. It takes a good deal of time to become familiar with a coebase, find a place you can improve, follow guidelines to do so, and then get the team to agree with you to implement the change. It’s quite a bit

While I continue to keep my eyes open I want to share when I did just this, on a new project that is a custom hook.

The project is called react-timer-hook and it’s a pretty cool yet small project. It’s simply a custom React hook that creates a timer for you, you can do a stopwatch or a simple timer.

Well I was working on a new project that needed a timer and I am learning about React hooks so I wanted to implement it as fully as I could. I realized after some practice that creating a timer React Hook is actually quite complex, and I decided that I’d rather just see if someone else has created one that I could build with.

I found react-timer-hook and got started, it looked good and did things the way I expected, only it didn’t have one feature that I really needed. So I thought I could just continue creating my own, or I could just implement the feature I needed in his project. So I took the challenge and decided to try to contribute.

So I started with a fork! It was honestly not that bad, it took me about a half hour to familiarize myself with the inner workings of the package and then started hacking away some custom code. It felt kinda cool being able to customize somebody else’s code.

Well I got it together and submitted a pull request. I felt quite excited about it and waited for a response.  A day or two later I got a response, the guy who created the package is from Dubai so I figured it might take some time. I got a response from him and he was grateful for my work. He agreed with some of my ideas and had some feedback in some implementatino details.

After reading his email I saw the changes he mentioned and I agreed with them, but was ultimately able to revise my pull request to align with his expectations and create the feature I was looking for.

Meanwhile I was still working on my own project, and I was just using a custom copy of the project while I waited for the Pull request to go thorugh. It was really exciting when we were able to agree upon details and have the pull request approved. I was able to go back into my code and rip out the custom code and instead replace it with the full package. That was pretty cool!

After an

 

npm update

npm got the most recent version for me automatically and off I went!

It was a fun little contribution and I feel more confident in being able to see an opportunity and going for it!


Profile picture

Written by IzzleNizzle who can be found playing around in the mountains of Utah. ⛰️ You should follow Iz on Twitter

© 2022, Built with Gatsby and WordPress