This is a recap of the Twitter #eggheadChat Q&A with @chantastic
Q1: When you first started the React podcast did it feel like you were shouting into the void? If so how did you keep going?
A1: I got SUPER lucky @mjackson had re-booted the podcast about 2 years ago. He asked me to co-host with him. At the he already had a good size audience for the show (3-4k downloads per episode)
But he decided the show wasn’t for him and asked if I wanted it That part was scary. I thought as soon as people caught wind that @mjackson was out, they’d stop listening I wrote more about that feeling on my newsletter: https://tinyletter.com/chantastic/letters/imaginary
I really didn’t think I’d be able to keep the podcast going. But It’s been ~18months now. We’re going strong with the tremendous help of @_mikhailbot and @sarahberus at @specfm. I’m incredibly grateful to everyone who continues to tune in each week
Q2: How do you research your podcast guests? Every time I listen it feels like a major deep dive!
A1: ooooh, that’s a good question
I get carried away with research. So I limit myself to one sheet of note paper. When I reach the end, I’m done
It’s always good to have some backup topics when I’m meeting the guest for the first time.
But honestly. I’m a nerd about questions
Sometimes we don’t even get to the questions I’ve written down. We’re just chatting. And when I try to fit my questions in, it feels forced.
It helps that I’m an honest fan of everyone we’ve had on the show
I find that it’s never hard to ask questions of my heroes.
oh I’m SUUUPER good at bullshitting
but that’s a longer story.
I got into programming because I was broke with a new kid and mortgage
I went to a bunch of meetups and learned how to talk the talk and ask questions that sounded kinda in the ballpark of reasonable
I talk about it a little in this talk: https://www.youtube.com/watch?time_continue=1&v=-NP_upexPFg&feature=emb_logo
There are conversations I listen back to and I’m just dumbfounded by how off base my follow-up question is
But I’ve started to feel a lot more comfortable in the “learn in public” — as @swyx says — mode
One of my first interview was about a ridiculously brainy research project at Facebook called Prepack. I am like the least qualified person to ask anything computer science-y
It was like jumping into the deep end. Everything’s been easy since: https://reactpodcast.com/18
Q3: If you had a month to learn React from scratch, what would you do?
(27 if the month is February)
But that’s a good question. This year’s #ReactHoliday is about exploring how quickly I can teach the critical #reactjs concepts. I honestly believe that you could expose anyone to all the critical React concepts in 1 hour…
I can say for sure that I wouldn’t spend a single second of that month worrying about performance
Performance concerns are reserved for apps that make money and track metrics
Performance jargon has no place in “from scratch” curriculum
Q4: Do you have any secret talents? Sing, dance, magic tricks?
A4: So… I was big into drama and show choir in high school I was also part of a really terrible emo band in the early 2001
You can hear me singing in the background of some of these tracks
Q5: When do you use useReducer and when do you recommend using custom hooks?
A5: I generally prefer useReducer to useState. If I’m not mistaken, useState is actually implemented on useReducer. don’t quote me on that
My rule for extracting components and hooks is after you’ve written the implementation 3 or more times
humans are terrible at naming things
having 3 repeated cases will make it clearer what the name should be and how generic it can be
I am very slow to extract code
I have components that are well over 1500 lines
But if implementation isn’t repeated, I don’t extract
Q6: Is it worth deep diving into enzyme if your work uses it even though react is shifting towards RTL?
A6: I believe that we can use most libraries in thoughtful ways The great thing about @testinglib
is that it makes disallows known bad testing practices If I worked at a company that used Enzyme, I’d look for the intersection of features with RTL and use only those
Focusing on testing principles will serve you in any codebase — with any testing harness.
Q7: What are your thoughts on the current state of the Suspense API and what do you think it means for both React and async orchestration as a whole?
A7: I love it
I think the API is great
SuspenseList is amazing. useTransition/useDeferredValue seem very natural and sensible
The challenge is that it’s all dependent on the quality of the data-fetching layer. And the only game right now is Relay
it’ll be at least another year before the community has meaningful opinions about what Suspense looks like in real applications