Episodes
Hey there friends. So yesterday I was just a fanboying I guess about
Prisma. If you haven't heard of Prisma, it is a Oh what does that? It's
ORN, I can't remember what what the word for that is but it interfaces
between you and a backend database. So it supports post-grass and SQLite my
sequel and a MongoDB support is coming.
So yeah, just so you have a database and you tell it what database what
kind of,Database you're hitting and how to connect to it or what the
connection URL is. And then...
Published 06/10/21
https://github.com/johnlindquist/kit/discussions/310
https://www.scriptkit.com/
Hello friends. So this morning, I finished something that I was working on
a little bit yesterday. It's a script kit script to call Cloud Nary upload
which allows me to very easily upload images to my cloud nary account. It
uses the cloud nary API and yeah, I just need a couple of environment
variables and and you can use this too.
You get script kit, you can copy the same script. And yeah, you just need a
couple...
Published 06/08/21
Hello friends, so I wanted to talk today about whether or not you should
make a custom hook for everything. So a few days ago, maybe last week there
was this thing going around where people were recommending that you never
ever use the react built-in hooks inside of a component, you always extract
it to a custom hook.
This is terrible advice. Don't do that at all. So the way that I think
about hooks in React is the they're basically functions that have the,Only
special distinction of being...
Published 06/07/21
https://stackoverflow.com/a/46780568/971592
Hello there friends. Sorry, it's been a little bit of a break but I was
working on something and I wanted to measure how fast it was but yeah and
so I'm gonna use the Chrome DevTools profiling performance tab to profile
it. And it's always so frustrating to like try and find the part of the
code that you're trying to profile in that flame graph.
It's really kind of a confusing area. And I remembered that there's the
performance mark API and so you...
Published 06/04/21
Hello there friends. Welcome to June I am thinking about Postgres and
Prisma and that sort of thing a lot lately because I'm working on my
website and doing that sort of thing and one tip that I have for you if you
ever do database sort of things is try to make sorry to make your data as.
As restrictive as possible. Early on as as you're trying to make things. So
like make things if you're like, I don't know if there should be a required
field or not make it required. If you're this is an...
Published 06/02/21
https://kentcdodds.com/blog/fix-the-slow-render-before-you-fix-the-re-render
https://kentcdodds.com/blog/colocation
https://epicreact.dev/improve-the-performance-of-your-react-forms
Hello there friends. So today somebody shared a lightbri with me and I
assumed that it was just a library to help you track rerenders. But it
turns out it's like a state management library and that helps you avoid
rerenders but my initial reaction and thought about tracking re-renders is
the tools like that.
I...
Published 05/29/21
Hello there friends, so I was thinking this morning about utilities and you
know these little utility functions that we write and we put it in like a
utils modular or something and sometimes when we're running these we want
to split things out to make it just.Easier to manage or something and and
it's just kind of a natural thing at least for me to want to split things
out into individual files, so each utility is in its own file, you know, if
it's just a single line or something.
I typically...
Published 05/28/21
Good morning or afternoon or evening friends, I wanted to talk today about
a saying that my wife has I think when my kids grow up they're gonna
remember my mom always used to say this and and so what she says is we'll
cross that bridge when we come to it now, of course this isn't like an
original saying but she just says it a lot and what she's saying is that
she doesn't want to make these decisions right now or use up the mental
energy to decide whether or not.
She wants to let the kids do a...
Published 05/27/21
Hello there friends So this morning I was just thinking about this little
tip that I share with you. It's pretty quick. In my global git ignore,
which is located in my home directory dot get ignore underscore global. I
have a couple of things in here that I wanted to shout out and specifically
this morning.
I was thinking about my ignored global good ignore. So I am I have a two
rules that will ignore any files that or any directories that end in dot
ignored in any files that include dot...
Published 05/26/21
Hello friends so I mostly recording this one so that I can hopefully not
forget it because I was working with doctor yesterday and I don't work with
Docker a lot but I'm kind of thinking about in the next version of Epic
React. I want to take the application that we build and make it even more
real world.
We're going to jump off of Create. React app and use Remix. Don't worry,
they're probably going to have some sort of free tier or a trial version or
something. So, I'm not going to force...
Published 05/25/21
Hello there friends, so I've just been thinking about incentives and
companies and and the yeah, like what what motivates people to have
different opinions and stuff like that. And I want to use myself as an
example here because I think it's a there's a lot of nuance with the way
that we kind of automatically think that people are have ulterior motives.
So, I created epic react to teach people how to learn react. And so my
question is did did I create epic react?And then say hey everybody...
Published 05/24/21
Hey there friends. Have you heard of progressive enhancement or progressive
web apps? Well, I thought of a real world thing that kind of resembles what
this actually means and what it doesn't. So, you know how like there's all
these memes of like I got a smart thermostat and now it's broken because my
internet went down or something like that and so now I'm like steaming hot
like why did I do this and and we have the same sort of thing with my watch
and so I have a smartwatch.
It's a,Nice...
Published 05/21/21
https://kcd.im/trophy
https://kentcdodds.com/blog/eliminate-an-entire-category-of-bugs-with-a-few-simple-tools
TypeScript is tests. Tests are type script. So type script is just a way to
give yourself more confidence. Sure, it helps you in your workflow, it
makes you a faster as you're developing because you have autocomplete and
stuff like that. And testing does the same thing as well as you
refactoring, you know that you didn't break anything you get a much faster
feedback when you you're...
Published 05/20/21
Good morning or afternoon or whatever it is for you friends, it's morning
for me. I wanted to talk about how I type a raise in TypeScript, so there
are two ways that I'm aware of that you can type an array and of course I
guess there are a couple ways depending on what type of an array you want
to make but just like a regular array you can either specify the type and
then immediately thereafter with no space a open and closing bracket like
the the syntax for an array and the alternative is...
Published 05/19/21
https://twitter.com/kentcdodds/status/1394420201542668289?s=20
So the other day I tweeted about how I really want people to stop minifying
and bundling what they send to NPM. And just to clarify I it's fine if you
want to minify and bundle as one of the things you distribute as part of
your package, but it shouldn't be the only thing and there are a couple of
reasons and what I do for my packages is I actually do have a UMD module
that is bundled and I have a minified version of that as...
Published 05/19/21
Hey friends, so I'm working on this little remix app and just something
about remix that I just this so cool the fact that your server and client
side code run is written in the same file if in case you didn't know that
that's that's what you do and it's really cool for validation so you can
start by validating just a hundred percent on the server and remix makes it
quite nice to be able to do that and that's where your validation should
absolutely.
100% go by default that's like if you're...
Published 05/17/21
https://kentcdodds.com/blog/make-your-test-fail
Hello there friends. I'm just driving now. I was thinking about a blog post
that I wrote a while ago. I think it was called break your tests or
something like that, but the idea is that it's just really easy to write a
test that passes and so you feel really good about it this this especially
happens if you're testing after you've already implemented something if
you're doing TDD this is maybe less of a problem, but it's really easy to
write a...
Published 05/16/21
Friends I'm out and about today so we might hear some like music in the
background and stuff but yeah today I wanted to talk about cypress driven
development. I was working on something that I'm working on for the new
website where you can submit a recording of a question and then I'll be
able to answer it's gonna be really cool but it's all like in browser
recording stuff and lots of what I was testing was like required me to have
to record something and then to continue on through the the...
Published 05/14/21
Hello friends So today a friend of mine on the KCD Discord is named Rupert.
I'm not sure. I'm pretty sure that's how you say their name. But I created
their very first poll request for open source. I wasn't aware it's the
first poll request but they did a great job.
And it was for the KCD Discord bond. And so the discord has a lot of cool
things you can do with it and one of them is they're a bunch of commands
that you can give. One of those commands is the thanks command where you
can give...
Published 05/13/21
So let's say that you want to convince your coworkers to try a new tech or
something like a new library or whatever and you think it's a really good
idea but people aren't convinced. So what typically happens is you want to
prepare a couple of ideas and stuff and bring it to a meeting and say,
okay, here's here's what I think and why I think this is a good idea.
And then people will present their reasons why they they don't think it's a
good idea. And people may come to the meeting kind of...
Published 05/12/21
https://staltz.com/your-ide-as-a-presentation-tool.html
Hello friends you may have noticed that sometimes I use my editor as my
slides in lots of the talks that I've given over the last few years and
that was originally inspired by André Staultz who has the a blog post on
his website called your IDE as a presentation tool where he kind of
explains why he has done that and it's a good blog post you can take a look
at that and even gives tips on how to do this effectively and stuff.
But I would...
Published 05/11/21
https://epicreact.dev/the-latest-ref-pattern-in-react
Hey your friends. So I get this question of fair amount and so I thought
I'd try to answer it and podcast form and the question is why don't why is
it not a good idea to set a ref during your render function? So there are
exceptions to this and understanding the reasoning will help you understand
what those exceptions are.
But basically, if you read my blog post on the Epic React dot dev slash
articles, there's a blog post about the latest...
Published 05/10/21
Hey friends I had an interesting thought this morning. So a lot of people
when they start using a new technology like when next was released or when
you know a new version of Reactor or or any React library or whatever they
often will say, okay, how do you I use this with an existing technology
that I already enjoy like, so how do I use next with glamorous?
That was an early thing. I remember or how do I use? Next with Jest or you
know, whatever whatever it is. I would encourage you to when...
Published 05/08/21
https://www.scriptkit.com/
https://kentcdodds.com/blog/automation
Hey friends So you know how sometimes you do things so many times that
you're like you know what I'm just gonna write a script for this and we'll
run it and whatever and so I don't have to do this over and over again. And
like some of those things can be pretty extensive, like there's a lot of
stuff that you end up doing like you gotta open up this webpage and then
you gotta click on that and then you gotta go do this,...
Published 05/06/21