Kent C. Dodds

Open source hacker and teacher, Creator of Glamorous, downshift, prettier-eslint and more

1st September 2017, 6:00 pm

This AMA is over!

Thank the host

Message from the host 馃挰

Hey friends! 馃憢 I'm excited about this! I'll be chatting with you all soon!

Ideas of things to ask about:

  1. Look at my github ( history and ask me about anything on there. (downshift and glamorous in particular)
  2. Look at my 3 minute podcast ( and ask me about anything in there
  3. Look at JavaScript Air ( and ask me about any of those episodes
  4. Ask me about any of my Frontend Masters ( or ( courses
  5. CSS-in-JS
  6. Privilege Awareness
  7. Really anything, I'm just making things up... :smile:

Note also that I do have a AMA on GitHub with over 300 answered questions: (Maybe I've already answered your question!)

Chat with you 馃敎

Edit: I'm going to livestream while I answer your questions! Why not!? 馃摵

What do you think about the recent ReactJS license controversy? Would you personally use it in your projects?

Hi Richard! Thanks for the question. Yours is number 1!

So I'm not a lawyer. Law is confusing. But a lawyer-turned-developer wrote about this:

Also, there are countless very skilled lawyers at countless companies you're probably familiar with (Apple, PayPal, AirBnB, etc. etc. etc.) and they've looked it over and apparently seem to think it's cool.

So when someone says that I shouldn't use React because of the patent clause I just want to know what makes them feel like they know more than lawyers at these companies :)

So for me, I totally use it in my projects. I love it. Cheers!

Hello !!

Being popular in the open source community, you are involved in many projects, which means more responsibility, more work and responding to the issues. This is a heavy task which sometimes results in exploitation and burnout (sick issues and more demands). What are your strategies for tackling this problem in the open source community ?

Hey Nitin! You're one of my favorite people :) Thanks for the question...

Yes, burnout is a tough deal in open source. I actually talk about this quite a bit on The Changelog episode #246. For me basically, I avoid burnout by being kinda heartless I guess. I just recognize that I don't have the time to take care of everyone's issues for them and I enable people to fix things themselves. So I have a course on contributing to open source and I invite folks to contribute back.

If someone asks a question and thinks they've found a bug, I ask for a suggested solution. In the process they often find it wasn't a bug. But if they do find a bug, then I ask them to dig deeper to find a solution.

I think the main bit of all of this is that you should recognize that you don't owe anyone anything and it's ok to say you don't have time to help them. Work on what you want to work on and let others work on what they want to work on. So long as you enable folks to do their work, they can't blame you for it 馃槈

Good luck friend!

Hi Kent, I have been following your work for a long time. When and how did you enter the OSS world? What was your first contribution to an open source repository?

Hi Karan,

Open source is super duper important to me. I have so much to thank open source for. I actually answered a question similar to this not too long ago on my GitHub AMA where you'll find a more comprehensive answer:

My first PR to a project was this PR to the Java Play Web Framework. It was a typo fix in JavaDoc. Not much, but it didn't need to be :)

Thanks for the question.

Hi Kent, Thanks for hosting AMA on Hashnode. What are some of the on-page optimization techniques you do for websites / projects?

Hello! Thanks for the question :)

There are lots of things you can do to optimize things. Whether it be performance, design, maintainability, scalability, whatever. I think the most important lesson I learn again and again about optimization is that doing it before you really understand the problem and root source of it will often result in a sub-optimal solution.

For example, if you optimize some code to be performant, you're probably trading off readability/maintainability of that code, and that's a significant cost which should only be incurred when the benefit really outweighs the cost. So if you don't know what the benefit really is, then you might be trading a bigger cost for a smaller benefit.

All that to say... When I was doing Angular 1, I had to deal with performance problems on a regular basis. With React, I have yet to have a performance problem with any of the code I've deployed. So I don't really think about it.

I focus more on optimizing developer experience to make it so you can improve both user experience and developer experience at the same time. That's one of the things I love about writing custom babel plugins because it allows me to do that. One such example is babel-plugin-lodash which allows you to ship less of lodash without having to cherry-pick stuff yourself. I talk about this a bit in my talk "Writing custom Babel and ESLint plugins with ASTs" (also there's my Frontend Masters workshop on the subject).

Another example that I personally built was this plugin for the glamorous website. It allows me to write all my content in markdown and make it easy to reference in the JavaScript. It's server rendered and makes localization really straightforward. It was super cool to build.

I think that we've only scratched the surface of what babel plugins can do for our DX (developer experience) and UX (user experience). If you want to get into this, I suggest you watch the videos I referenced, also check these out:

I don't know whether that was quite what you were looking for, but I hope it's helpful. Good luck!

Hi Kent, thank you for the AMA. How do you managed the time between job and OSS liked you did ?

Hi Emanuel! Thanks for the question.

So I get this question a lot actually. I lay out a general schedule in this answer on my GitHub AMA. Basically there are a few parts to this:

  • Have a good solid schedule
  • Don't waste time on things that don't bring you happiness (open source brings me happiness, but video games [for example] don't, so I don't play video games)
  • Try to take the work you're already doing for you job and make it open source!

That last one is significant for me recently. I built glamorous for PayPal, so I could work on it during work hours. (I think I'll talk more about the origin of glamorous in another question.) The same is true for downshift and various other projects. I don't have a problem contributing to open source projects (whether they're mine or not) during work hours so long as it's part of what I'm working on. So that's part of why my GitHub contribution graph is so green 馃挌

Thanks for the question. I hope that's helpful :)

Which developers/coders do you admire and why?

Hello again Richard!

There are so many. But here are some I can think of right off the top of my head:

  • Sarah Drasner: She is super duper nice, extremely talented, teaches what she learns, and gives freely of her time and knowledge.
  • Kyle Simpson: For his amazing practical understanding of the JavaScript language and his incredible skill at teaching it.
  • Ryan Florence: For his simple view of React and his ability to teach that view to others in a way that's clear and convincing.
  • Marcy Sutton: Because she cares about and fights so much for something that is so important and other people just shrug off (accessibility).
  • Henry Zhu: For his positivity and playful attitude toward open source despite people being mean sometimes.
  • Dan Abramov: For his humble and unassuming nature and his willingness to understand other perspectives and help the community do the right thing.
  • Sunil Pai: For all the amazing stuff he builds. We've chatted a few times about things that I'm working on or we're working on together and whatever he says, I'll just go with it because he just has a great perspective and knowledge about software development.
  • Nitin Tulswani: For the super duper awesome stuff he builds recently. He's not afraid to build things people will say are dumb. I don't think they're dumb. I think they're mind-bendingly awesome.
  • Ives van Hoorne: Because he's built CodeSandbox and I think that's one of the coolest things.

I'm sure there are so many others that I'm missing out, but I think the things I really admire in people are:

  1. They're nice
  2. They're skilled at what they do
  3. They can and do teach and enable others to become better than they are.

What is some advice you can give to engineers who want to spend more time working on open source as part of their work but don't know how to bring up the conversation with their managers/employers? It sound like a simple answer could be "move to another company that values open source", but that wouldn't really change how that company views the importance of open source work.

Hey Lewis!

This is an awesome question. So I think that managers need to understand the value of using and creating open source projects. A huge part of that is the end result will be better. Just one example is bugs will be found by other developers rather than your users.

I think that business users can see the value better if they see $$$ attached to it. So let's say you have a situation where a library is almost what you need except for some bug or something. So you can say this:

Hey, listen, so this open source software is almost just what we need except for this one thing. So I can either spend a day contributing back, or I can spend 6 weeks building a less-good version myself. What would you like me to do?

Try to bring things back to money/time/etc. Also, I think more of the world is starting to embrace open source. So it really is often just a matter of asking. Good luck!

Hey Kent, what's the best way you've managed to stay motivated to work and be productive so often?

Hey Philip! You'd be surprised how slow going I can be when working on things that I don't find interesting or exciting. It can take me a lot of effort and time to get things like that done.

So, for me, it just has to be interesting, challenging, and fresh. I don't like working with old tech. I prefer to work on green-field stuff (I think most folks relate to this).

So whenever I have something to do, I try to work in something exciting and interesting with it. This is kind of where downshift and glamorous came from. I could have hacked together something to get my "user story" done, but that would have been mundane, boring, tedious, and the end result would have been not as good. So I made it more fun by building something to make the end result better. And by doing it as open source, that made it more fun too.

I hope that helps answer your question. Good luck!

Hi Kent, what were your motivations to become more of a public person, doing AMAs, live coding sessions and of course participating in OSS ? You are truly inspiring, and I would like to know why did you choose this path.

Hey Louis! Thanks for the question!

I never really saw it as becoming a "public person." It's more just how I operate. I learn by building things and teaching others. I can do this best by making as much of my stuff open and public as possible. I've actually blogged about "How getting into Open Source has been awesome for me" and just read another blog on the subject of why contributing to open source is so great that I thought was really good.

I enjoy helping others be successful and open source/live streaming/AMAs/etc. is a great way to do that. I hope that helps :) And I hope you do that too and find happiness with it :)

Can you please tell me how to approach reading open source JavaScript source code? I am a beginner in JavaScript.

Hey PK! Welcome to the JavaScript community!

I think that you've got the right idea to start your JavaScript journey getting into open source! There are so many things you can learn from open source.

As for getting better at it. I think the best thing you can do is just do it a lot! There's no shortcut to experience. It just takes a lot of time. I did answer a similar question on my GitHub AMA which you might find interesting (also this one).

Also, you might be interested in this blog post as well.

Good luck!

CSS-in-JS: Would you trade the ability to have dynamic styles (any expression in CSS rules) for the benefit to compile CSS-in-JS to a static CSS file as build step?

You would be disallowed to do css.thing { width: ${Math.random()*100}px but still could do css.thing { width: ${props.big ? 100 : 50}px.

For this you get the benefits of static CSS: No runtime, easy SSR, no double parsing.

Hey Tobias! I'm so glad you stopped in to ask! I actually was working on a precompiler for css-in-js that would do this, you can find it here: css-in-js-precompiler. It actually works really well and can even track some dynamic values (even if they come from import statements).

I stopped working on it though when I realized that CSS-in-JS is pretty far down on the list of bottlenecks for my application's performance and my users would be better served if I focus my efforts on other areas.

I expect this is the same with many other people (CSS-in-JS is NOT their bottleneck), however, many folks desperately want static css files and for those folks I say that if perf is that important, they should server render their apps! And, if they server render their apps, then they don't need static css extraction!!! Oh my! Because you get critical CSS by default with CSS-in-JS which I think is awesome.

All that said, if you really want to work on it, I'm sure folks would be willing to forego dynamic CSS-in-JS to get css files. If that's what you want, then I suggest emotion.

Thanks again for the question, and thank you for all your work on Webpack! My open collective sponsorship money for webpack was sent again and I'm always happy to see that email come in because I love what webpack is doing for the web. Keep it up!

What are your personal goals as a developer and human?

Hey Siddharth!

I'm looking for happiness. So whatever brings me that the most. I'm a family man (my wife and I are expecting baby #4 any day now), and I find a lot of fulfillment with my church activities and my job. That's pretty much all I do: Family, church, software.

So my personal goals? Keep finding happiness by helping others, building awesome stuff, and spending time with the people who mean most to me.

Noticed you host your personal site on Netlify.

  1. Would you recommend for larger client sites?
  2. Are you a proponent of JAMstack vs Isomorphic?

Great question Tony!

I LOVE Netlify. I'm a huge fan of the JAMstack concept. I think that if you can manage it (don't need SEO) then it's the way to go (otherwise, SSR with Next.js is the BOMB 馃挘).

Reasons I love the JAMstack:

  1. It's conceptually simple.
  2. It's easy to deploy/rollback: Ship a few files to a CDN 馃し鈥嶁檪锔
  3. "Perceived performance" is super because you can show your user something very quickly even if they're on a bad connection or low-end device.
  4. It forces you to separate your client from the backend which makes development much simpler.

I hope that's helpful!

I have just started to use Netlify heavily and also LOVE it!

You have reinforced my feelings on the subject and believe we need to move away from the bloat on server side rendering where possible.

What was the inspiration behind creating Glamorous? What's the back story?

Hey Simon! Thanks for the question. I've been asked this a fair amount. I talk about it a bit in the intro to glamorous blogpost and I mention it in this podcast with Tyler McGinnis. I also talk about it a bit in this talk.

In short, at PayPal I was tasked with making our landing page more flexible (because it's highly experimental). One of the biggest challenges was CSS (we are using Less). When to share styles and when to diverge was a hard question (also, the age old difficult question of: "can I delete this CSS"). So I looked into several CSS-in-JS solutions and loved the APIs for styled-components and jsxstyle, but there were a few things I didn't like about each, so I built glamorous as a way to solve my problem at work in a way that I wanted. Turns out other folks kinda liked it too :)

Thanks for the question!

P.S. The basic idea of this story applies to downshift as well 馃弾

Usually how long it takes for you to get comfortable and start using any new Js framework/lib to production Apps. How do you plan for it. Also before trying out anything new, do you benchmark with your current stack.

Hi Ankit! Thanks for the question :)

Ummmm.... I use new tools all the time. I don't often change frameworks. I've pretty much only used Backbone.js, Angular 1, and React. For libraries I pretty much just build stuff with it a lot. There's no shortcut to experience. You just gotta build things. So I don't do too much planning. All that said, if a library takes a lot of time to get comfortable with it, that's probably not a good sign.

As far as benchmarking, I actually don't benchmark a whole lot. In a earlier question, I talked about optimizations and I find that my list of bottlenecks is normally around how much code I'm shipping rather than how optimized that code is. So I don't often care much for benchmarks. I have other things to focus my time on...

Good luck!

When you have a difficult situation how do you deal with it? So, it doesn't affect your family and your job.

What book or resource you consider essential to learn about programming best practices?

Hey Carols! 馃憢

Hmmm... Well, I don't really read much, but I do listen to a lot of podcasts and subscribe to a lot of newsletters (find a list in that link).

I think the best way to find best practices is to experiment and try things. Build build build, then teach. That's been a great way for me to gain experience in software.

I hope that's helpful! Good luck!

What does "Privilege Awareness" mean in this context?

Hi Peter!

Privilege awareness is realizing that we all have certain amount of privilege, and being aware of how much you have. It would actually take me more time than I have to express all my feeling son this subject, but I think that those with privilege (aka having things others don't when you didn't do anything of yourself to get those things) should really be aware of that fact. Not to guilt them, but to motivate them. For me, my privilege motivates me to help other people. That's one of the reasons why so much of my stuff is free (or I make a free version of it). Because not all people work at a big company that can afford to pay for a subscription to Frontend Masters (for example).

I'd love to chat about this more later, but time is running out on this AMA!

With ES6/ES7/ES.Next, we saw/are seeing JavaScript as a language catapult forward with lots of new changes and goodies.

What do you see as the next step forward for JavaScript as a language?

Hi Eli!

So, I represent PayPal on the TC39 and try to keep up with what's coming in the language. I think that JavaScript will continue to cater to people of varying preferences. We're seeing a lot of attention on classes recently, but I'm looking forward to some other enabling features (like realms) and some nice functional programming syntax (like es-pipeline-operator).

Often people will ask me when we'll get types in JavaScript. I think that will never happen. One of the problems is we need backward compatibility and that's often a real show-stopper for some things we're doing.

I'm excited about the features coming into JavaScript. I think the language is so much fun to write now. Huge thank you to Babel for making it accessible to those of us still supporting IE10 or lower.

How do you crank out the sheer amount of goodness that you do? Any productivity tips?

Hey David! How are you doing!? :) Thanks for the question.

I type really fast :P also, I type things and use things that make it so I don't have to type as much in the future. My GitHub AMA, oss project generator, semantic-release, prettier, etc. etc. etc.

Also, I should mention that even though I churn out a lot of stuff, I don't think I really do a whole lot more than other folks. I just make what I do public (if I can). Recording talks and workshops, doing tech chats and livestreams, and open sourcing as much as I'm able to (even work stuff) gives the illusion that I'm doing a ton of stuff.

Good luck!

What are your thoughts on the unfolding drama with the Node.js technical steering committee and the 'Ayo' fork?

Hi Peter!

Unfortunately, I haven't taken the time to look into exactly what happened, but I think I get the gist. I'm sad that the code of conduct was broken and things weren't dealt with super well (in my unresearched opinion). I think that Ayo will not have the success that io.js had back in the day because things are a bit different. It's more social, so I expect the only people who move to Ayo are those who know or care about the situation. Also many folks will just think that io.js will happen all over again and Ayo will be merged eventually so they have no need to switch.

We'll see though. Thanks!

Hi Kent, why do you use custom prettier settings and not just the default (e.g. as in I like to think that if prominent/respected folk like yourself advocated the default settings, we would get closer to a "one format for all" world. Thanks, Jon.

Hey Jon! Thanks for the question! So, I can appreciate "one format for all," but I just have my preferences. I don't like enforcing those preferences on others (I'm loosening up my stylistic ESLint rules thanks to prettier), but I've got them, and because it's so easy to auto-format with prettier and configure it the way I like, I'm sticking with that 馃榾

I'm trying to get community feedback/critique on a state management tool but have a hard time selling it in. How do you get help beyond "looks cool"?

Have you thought about making a tool for creating downshift-like components?

Hey Marcus!

I actually have thought about some sort of library or tool. I think something that could make controlled components and prop getters easier would be nice. When I was building react-toggled I realized I was copy/paste/modifying quite a few things that would be kinda nice to just have in a library.

So maybe someday :) I definitely want to see more components using these patterns in the future, so I'm motivated :)

Hi Kent!

thanks for the AMA :) I think the real benefit about having CSS-in-JS is to give developers (not designers) more control about how the UI is displayed, and does not focus primarily on performance... do you agree? (not trying to be negative here... just asking!)

hope you did not cover this topic before :P

Hi Horacio! Thanks for the question. I love CSS-in-JS. I think it's made me more productive and create more maintainable components.

To say the focus is not on performance is inaccurate. It may not be as fast as regular CSS, but it has many other benefits while still being fast enough. I suggest you read this blog post by my friend Mark: "A Unified Styling Language".

Good luck!

P.S. I'll also add my talk on the subject which I think justifies some things as well.

What is your advice for people who want to get started with contributing to open source code? Many don't know which repos to start with or what guidelines to follow. Do you have any specific tips for them?

Hey Susan! Thanks for the question. I get asked this question all the time! So I've written a blog post to answer it: "What open source project should I contribute to?"

Key takeaway: "You contribute best to something you use regularly"

Also, you can watch this free online course: "How to Contribute to an Open Source Project on GitHub"

I hope that's helpful! Good luck on your open source journey.

I've found to be efficient and accomplish coding goals, I need at least 3 hours without distractions.

Do you have similar distraction issues, and if so, how do you find the time? And if not, can you suggest how to be productive in a distracting environment?

Hi Dennis!

Whelp, I work from home. So most of the day I'm not at all distracted by my environment (unless my kids come to my door or window and peek in, which is a distraction I welcome!).

Having a block of time without distraction is really useful! I think the best thing that I've done is just get really excited about what I'm working on, then I'll ignore notifications and other distractions.

I'm not sure I can help in a situation where you're not excited by what you're doing. I'm really bad at that. Just look at how many tweets I've tweeted 馃槄

Good luck!

We know there are a lot of great resources on the internet to learn new, amazing and great things! What is your opinion about people not going to the "traditional" university and learn by doing by themselves? Do you consider getting a degree in an expensive place adds value?

Hi Alex, Actually I answered this question for a blog post recently!

Hi Kent, I saw you at the NG-Conf :) according to your opinion is Node.js ready for the enterprise? Meaning, large and complex applications, high concurrency, lot of user sessions, parallel tasks, transactional portals, etc.

Hi Alex!

PayPal and others have been using Node.js for YEARS and YEARS. It's beyond ready for enterprise. It's already working. Good luck!

Hi Kent,

what's your opinion of RxJS? Do you find it useful? Is it common in the react community?

What's the best Javascript Stack today?

Hi Alex, thanks for the question :)

Ummmm.... I'm not huge on backend stuff. I like Express?

I really love React and Next.js. I think those are two really cool technologies.

Sorry, that's probably not super helpful 馃槄

What do you follow to be very efficient and productive developer?

How do you rate success for an open source project?

Hi Dara!

Success is when it's serving the purpose it was created for. Stars and downloads only mean people have starred it and downloaded it 馃し鈥嶁檪锔 which is cool, but not necessarily a measure of success. It's kinda tricky, but I don't really worry about it myself. I'm interested in solving my own problems, then building a community around it by enabling others so they can help me solve my problems better 馃槈

Good luck!

What are the few dev tools (software and hardware) you cannot live without and carry with you always? :)

Hi Karan! Good question! Here are some links:

I also really like Alfred, and TextExpander. I use those tools all the time.

Oh, and Chrome. I like web browsers.

Hey, How do you plan your day to be productive and do all open source and job stuff on time? Have you read any books in that area or just ended up figuring it out over time? Thanks

What difference did contributing to Open Source have in you, yourself, as a developer?

Hi Kashis! This question is pretty similar :)

Makes sense. Thank you. :D

What functional language would you recommend JS developers to learn? Do you think functional languages like PureScript, ClojureScript will be used as the main languages in the future for React/React Native apps?

any thoughts on having the next event in the earlier part of the day as I am in the UK and its midnight? are you going to record the session?

Hey Kent,

What do you think is the most important skill/concept/mindset for junior developers (front-end or back-end) to attain to take the next step in their development careers?

Thanks for doing the informal roadtrip ama/conference a few weeks back! Any plans to do a carpool conference or roadtrip podcast in the future?

In which university are you graduated?

Hi again Carlos! You can learn that and much more from my first answer on my GitHub AMA. :)