burnt-toast emoji

Posts tagged with :burnt-toast:

aaryan
@aaryan0
OMG TIL that React StrictMode (which is enabled by default in create-react-app) renders components twice in order to detect any problems with your code and warn you about them. Even react docs mentions this! How I came across this: I added a Toast component in my useEffect, and it was showing up twice on every load. Which lead me to a LOT of reading and googling, and realizing I'm using useEffect wrong and React is trying to tell me that :) This was fun.
https://cloud-lm8hfp1ww-hack-club-bot.vercel.app/0image.pnghttps://cloud-50g1aibrg-hack-club-bot.vercel.app/0image.png
burnt-toast emoji
goose-honk-technologist emoji
react emoji