Skip Navigation
How do you find the source of an infinite re-render?

I have a custom hook that I'm working on to make a fetch request to an api, and it is causing infinite re-renders. I'm struggling a bit to understand how the various parts of my application fit together -- in particular, my store (zustand) is using a middleware (immer) for immutable state, and I'm not certain why its drafting system isn't protecting me from changes in object identity. What tools can I use to try to track down what I've gotten wrong? I can't really leave the web page open very long because I'm making 1000s of requests per minute to the api I'm working against, so the Chrome dev tools are out, and the static analysis tools I set up (typescript and eslint) haven't identified any errors, like missing a dependency from the useEffect hook dependency array.

3
Ranking all 29 MLS teams by tier for 2024
www.mlssoccer.com Ranking all 29 MLS teams by tier for 2024 | MLSSoccer.com

As is now tradition, my final piece of season preview coverage starts with a tip of the cap to the great Zach Lowe for the inspiration, courtesy of his Annual Tiers of the NBA opus.

Ranking all 29 MLS teams by tier for 2024 | MLSSoccer.com
0
Every Best Picture Winner Ranked by How Good a Muppets Version Would Be
hard-drive.net Every Best Picture Winner Ranked by How Good a Muppets Version Would Be

The Academy of Motion Picture Arts and Sciences votes on the best movie every year. Whatever they chose is indeed the Best Picture: They have…

Every Best Picture Winner Ranked by How Good a Muppets Version Would Be
14
Rocks Are Immutable by Michael Roberts

ROCKS ARE IMMUTABLE

Rocks are immutable and hold No scope for self-aggrandizement, Each well-worn pebble churned and rolled Suffers a like predicament.

Gripped in what mesh of causal schemes Endures each casual atom what When one perchanced electron screams A stuttering signal, and is not?

Grant then a gamete, grant a score By crabbed environment beset, And man the instrument, no more, And where’s the credit? Where the debt?

Or grant pure chaos, flickering chance, And life’s defection near and soon, Then mark the shock of circumstance, The day from solid darkness hewn — Rock is a shivering miracle, Betrayed in sunlight, gleaming wet, And love cries out in chlorophyll To welcome truth in petals yet!

— From These Our Matins (1930) by Michael Roberts.

0
Ivory Coast beat Nigeria to win AFCON title
www.espn.com Ivory Coast 2-1 Nigeria (Feb 11, 2024) Game Analysis - ESPN

Expert recap and game analysis of the Ivory Coast vs. Nigeria Africa Cup Of Nations game from February 11, 2024 on ESPN.

Ivory Coast 2-1 Nigeria (Feb 11, 2024) Game Analysis - ESPN
1
TWISTERS | Official Trailer
17
The Fall Guy | Everything
6
Microblog Memes @lemmy.world CombatWombatEsq @lemmy.world
And it was a huge PBSuccess!
29
Calls Mount to End the Era of Unquestioned Highway Expansion

The article is a bit Washington-centric, but The Communities Over Highways Campaign the article is about is not -- I just couldn't find a source with a broader perspective. You can find the campaign's site here: https://americawalks.org/the-communities-over-highways-campaignwhat-you-need-to-know/

0
They hadn't even evolved into secretary birds yet smh

Image is captioned: "The dinosaurs didn't "rule the Earth", they were just alive. Stop giving them credit for administrative skills they almost certainly did not have."

Image is an artist’s rendition of dinosaurs in a prehistoric scene

35
Political Memes @lemmy.world CombatWombatEsq @lemmy.world
Yes, but do they have AR-15s on Mars?

Image reads: "we're flying electric helicopters on Mars yet you can't turn on your clothes dryer in Texas. That's because scientists are in charge of Mars, and Republicans are in charge of Texas"

22
Political Memes @lemmy.world CombatWombatEsq @lemmy.world
Tucker Carlson's head is so far up Putin's ass he can see Sarah Palin's front porch

Source: https://vmst.io/@drrjv/111910086412601054

28
And I check Lemmy first!

screenshot of a tweet that reads: “going on Reddit for me is like going into Spencer’s in the mall. I need to find something very specific but I’m uncomfortable the whole time and don’t want anyone to know I’m there.”

11
Deferred JavaScript promises using Promise.withResolvers
pawelgrzybek.com Deferred JavaScript promises using Promise.withResolvers | pawelgrzybek.com

You can use it to avoid nesting in the promise executor, although it shines when you need to pass resolve or reject to multiple callers.

Deferred JavaScript promises using Promise.withResolvers | pawelgrzybek.com

const { promise, resolve, reject } = Promise.withResolvers();

1
Import attributes · V8
v8.dev Import attributes · V8

Import attributes: the evolution of import assertions

import json from './foo.json' with { type: 'json' };

0
Deleted
What's the most supernatural thing you've experienced that has no rational explanation?
  • Growing up, I was Mormon (though I no longer am), and I served my mission in Russia. I was serving in a little town outside Moscow called Lobyna (meaning "the place of the skull"), and it was mid-winter and my companion (that's what the other missionary in a pair is called) and I were sign-boarding, handing out free Books of Mormon. I noticed that there was a man who had walked by our station a couple of times, dressed kinda bedraggled -- I noticed him because he wasn't wearing any shoes -- who seemed interested in talking but shy about starting a conversation. I offered him a copy of the book, and struck up a reasonably pleasant conversation that resulted in my inviting him to take the discussions by meeting with us in the church building.

    Our companionship lived on the second floor of the church building, which was a converted dacha (a Russian summer home), and then the first floor and half of the second floor was reserved for church activities. We scheduled our meeting with this investigator (I don't remember his name, it's been a few years) to be right after morning study, so we didn't have to leave the house and come back.

    Come the day of, and I go downstairs to the kitchen to make breakfast, and lo and behold, our new investigator is sitting in the middle of the biggest room (the chapel/former living room) on a folding chair just waiting. I called down my companion, and we did our discussion earlier than expected, which was fine, and then did morning study afterwards. I don't remember a lot of that first meeting, other than he seemed like a reasonable Russian Orthodox member who was chatting with American missionaries. What I do remember is that when I went to let the investigator out, I had to unbolt both front doors to do it.

    After he'd left, I asked my companion if next time he'd please tell me when he lets people into our house, to which he replied that he didn't let the investigator in, he just assumed I'd done it. This was when I started to get concerned. You see, Russian doors aren't like American doors. Generally speaking, there are two doors -- a wooden door with a lock like I'm used to, and then a "fire door", which is like an inch and a half thick steel with five deadbolts into the frame (three into the wall, and one into each of the floor and ceiling). This isn't a "tee-hee" kinda situation to open up the door to get in, you would have to do major structural damage to enter through a door. And it was mid-winter (like -30 - -40 degrees mid-winter), so it wasn't like we forgot and left a window open or something. We resolved to be extra certain to lock up the house next time.

    Which is why it was so surprising when, a few days later, he was sitting in the middle of the chapel-living-room waiting for our appointment an hour early again. We had checked all the bolts and windows and everything, yet there he was. And this time, the discussion went thoroughly off the rails. He was telling us about how the spirits of the dead congregate behind a comet that circles the solar system, and that they're awaiting the confluence of some celestial bodies and would get free and so on. We wrapped up the conversation and did not invite him back, and never saw him again.

    And sure as shootin', when we checked the doors and windows when he left, they were all still locked and barred. It's been 15 years and I still don't know how he got into our house.

  • USWNT captain Horan: Most American soccer fans aren't smart
  • I definitely agree with her on one point: her comments did make me angry.

    I’m still in a “we need to grow the game in the US” phase of my fandom, and you catch more flies with honey than vinegar. Berating fans ands prospective fans for not being knowledgeable enough, and that they can’t trust commentators to help them learn isn’t going to draw new fans in or help existing fans build their knowledge. Instead, it’s going to make soccer seem inaccessible and unknowable.

    It’s cool that you coach. What age group/level?

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)CO
    CombatWombatEsq @lemmy.world
    Posts 226
    Comments 194
    Moderates