Hacking React at Chegg

Flarnie Marchan
6 min readJan 5, 2019

--

After working on open source projects at Facebook, it’s time for my next adventure.

TL;DR: It was truly awesome to work on the React Core team and to maintain the Draft.js framework. This is the story of how I got there, and why I’m now joining the web engineering team at Chegg.

I’m excited to be joining Chegg for three reasons;

  • Their mission to help students has a positive impact on people’s lives.
  • Chegg engineering is going all in on React, Redux, and other modern, Open Source web technologies.
  • Chegg has a positive company culture, placing an emphasis on workplace equality, teamwork, and fun.

At this time of transition, I’d like to share about my experience working on the React and Draft.js frameworks, and how this change will impact my work in open source.

How to get into Facebook Open Source

My interest in open source started long before I joined Facebook, and so I was looking out for opportunities to get involved in open source when I started working at Facebook in 2015. When the author of Draft.js posted internally looking for volunteers, I showed up.

In case you haven’t run into Draft.js before — it is widely used for rich text editing in Facebook products, and in the open source React community.

Draft.js is widely used for building rich text editors.

Things were going well — and then came a plot twist! The Draft.js author left Facebook. The next day I looked at the project and saw that nobody else had picked up the role of “maintainer” internally at Facebook.

I messaged my manager, saying — “I want to take this on”, and he said “Go for it!”. So I took over maintaining Draft.js using 10–20% of my time, starting in late 2016. With the help of many co-maintainers, we fixed bugs and improved documentation for the framework. The biggest problem we faced was syncing the changes from within Facebook and those from GitHub into both repositories. With the help of the open source support team, we set up scripts to automatically copy changes between Facebook and GitHub. Internal Facebook adoption of Draft.js grew by ~46% during 2017. The Open Source Draft.js community also grew, more than doubling monthly npm downloads between June-Dec 2017. I believe that my involvement in the Draft.js project helped made my interest in Open Source more visible within Facebook, leading to the opportunity to join the React Core team and work on React.js itself.

I’m proud to have helped prepare the 15.6 and 16.0 releases of the React framework. During my first few months on the team, I kept lines of communication open with other library maintainers and connected with the open source community at meetups. That was exciting, but I wanted to keep polishing my engineering skills rather than focusing too much on community management. So after the 16.0 release I took on a project to update Facebook’s legacy web infrastructure for compatibility with new features in React.

You might wonder, what’s it like working on the infrastructure for Facebook.com? I remember a day that Brian Vaughn asked me “How’s it going?” and I told him that it was like spelunking through an ancient, mysterious dungeon or temple, like in Indiana Jones. The custodians of the temple were either long gone or on vacation, or had forgotten the ins and outs of the code they wrote years ago. It feels risky, because pushing a bug could take down all of Facebook.com! So you just get brave and keep going. And you also use feature flags.

cc Avery Studio

I helped with various other projects along the way, such as the rewrite of the Reactjs.org documentation site, but overall I was “heads down” in my focus on the internal Facebook React community. I also put my Draft.js work on hold, in order to focus on React usage within Facebook. By the end of my time on the team, I found myself less involved in the open source community outside of Facebook. So, while I was sad to leave my day-to-day work with the folks on the React Core team, I will be happy to reconnect with the open source JavaScript community outside of Facebook. I will continue contributing to open source projects in my spare time, including React.js.

React.js still has a dedicated team at Facebook, and I’m excited to watch as Hooks, Suspense, and other improvements are released. I believe React will continue to revolutionize front end development.

Draft.js, on the other hand, has never had a dedicated team within Facebook. And I just left. So who will maintain Draft.js now? Not to worry! Because —
In preparation for leaving, I recruited 5 new Facebook-employed maintainers for the Draft.js framework. They’re already made tons of progress, including re-licensing the Draft.js framework using MIT and removing the patents clause! If one maintainer was good, then having 5 maintainers will be even better!

5 maintainers are better than 1!

And yes, I do still plan to contribute to Draft.js, as an external maintainer. The future of the project looks more hopeful than ever before.

How to find the perfect job

When considering a new place to work, I relied on a secret that Tom Occhino once told me — just look for these three things:

  • 🦸‍♀️ Great mission; a product or mission you are passionate about.
  • 💻 Great technology; the languages and frameworks you like most.
  • 🌈 Great people; honest, kind folks who make you laugh, in a supportive company culture.

If you find at least two of those, then you can probably get excited about work and ignore the one that is lacking. If you find all three, that is a true winner. I’m proud to say that Chegg has a great mission, great technology, and great people.

A mission to educate

The world needs education, now more than ever. Helping students learn will undeniably make the world a better place. Folks I have met at Chegg have a genuine passion for education and for helping students.

Awesome web technology

Chegg’s audience is mainly college students. Where do college students go to study? Today’s students go online! As someone passionate about the web, I’m excited to be at a company with a strong focus on web technologies. As I mentioned, Chegg engineering is adopting React, Redux, and several other fantastic open source projects.

Happy, diverse, successful engineering teams

When looking for “Great People” to work with, the main factor is the work environment. Chegg is an excellent case study on how to create a great work environment:

Working in this environment, I will find positive patterns that we can promote in the wider engineering industry, advancing the engineering field overall.

Onwards

Draft.js and React.js both have internal Facebook maintainers, and I’ll continue helping with each in my spare time. With great thankfulness for the time I spent at Facebook, I’m excited to join the worthy mission and excellent quality of Chegg engineering!

--

--

Flarnie Marchan
Flarnie Marchan

Written by Flarnie Marchan

Software Engineer at Chegg. Formerly React Core member. Views are my own. Find me at https://github.com/flarnie

Responses (2)