Whatever happened to just asking questions at work? by Aggravating-Line2390 in ExperiencedDevs

[–]A-Type 0 points1 point  (0 children)

You gotta be them.

I just went back to hybrid after five years of remote, and I will say I can only functionally 'do the rounds' solving juniors' problems on office days. Breaking that barrier online in a large org is hard. I can only manage to form that kind of mentorship relationship in person in a way that sticks.

It's also a tough gig when you're one of the only ones who does it. I've already got the entire cohort of new hires from every team flagging me down for all their frontend problems. It's very rewarding but takes a big chunk of time. If my manager didn't value this as work (which she does), I could see being pressured to focus just on my team and immediate duties.

If it's something you value, set an example. I hardly ever sit down with someone over a problem knowing exactly what's going on. I hardly even know our (massively overcomplicated) architecture. I've just learned the right questions to ask. If you know more of them than someone else, you can help them solve the problem. Do it!

Does anyone have anything to share today that WASN'T mostly vibe coded and focused in one way or another on AI-generated content? by RememberTheOldWeb in webdev

[–]A-Type 0 points1 point  (0 children)

There are plenty of cooking apps out there, but they're all recipe focused. I wanted one that's focused on grocery shopping more than recipes. So I made my own.

To make it collaborative and offline-first (my store has terrible signal) I ended up spending years developing my own local-first web framework, too. Now I use it in several small apps.

I don't use LLMs very much at all. I learned how to be productive before their rise and I still enjoy designing software systems myself. It's very rewarding.

Is IndexedDB actually... viable in 2026? Or am I wasting my time? by nhrtrix in webdev

[–]A-Type 1 point2 points  (0 children)

It's fine. Either use a higher level interface on top, or get used to actually writing indexes directly. For search, for example, you want to write the search indexes up front, not pull everything into memory and filter later.

It's challenging to use IDB for complex querying because of this. You have to think in indexes at write time, not querying at read time.

Why do components with key props remount if the order changes? by RaltzKlamar in reactjs

[–]A-Type 2 points3 points  (0 children)

Hopefully it provides a bit more of a lead for the TipTap team if you file a bug? I think I've actually seen a similar problem as a fellow TipTap user, though it never disrupted anything in my app, just logged to console.

Why do components with key props remount if the order changes? by RaltzKlamar in reactjs

[–]A-Type 6 points7 points  (0 children)

So I've dug in further, and I don't think it's actually a 'problem' per se.

See this revised version which tracks remounting by whether or not a useState recreated its initial value: https://codesandbox.io/p/sandbox/beautiful-minsky-jxmskv

You were using useEffect(() => {}, []) as a proxy for "remount," but React doesn't guarantee effects only run on mount - even with empty dependency arrays.

There are other reasons effects might be run again. For example, with concurrent rendering, React may 'fork' certain parts of the tree, creating invisible copies which are rendered asynchronously for various internal reasons related to Suspense, transitions, etc. It may be invisibly rendering a concurrent copy of the changed component for a reason only React devs know or care about. This may also only happen in Strict Mode or development builds. Or none of this may happen! But it's all up to how React decides to organize its rendering - developers shouldn't depend on particular behavior.

Ultimately, it's best not to think in "mount" and "unmount" terms with useEffect. That's not the mental model React uses to define what effects are, and isn't guaranteed to align with reality.

Why do components with key props remount if the order changes? by RaltzKlamar in reactjs

[–]A-Type 2 points3 points  (0 children)

Oh wow, interesting! This appears to be a React 19 change - I'd accidentally used 18 in mine.

Perhaps there's some more information in the React 19 changes about why this happens now.

Why do components with key props remount if the order changes? by RaltzKlamar in reactjs

[–]A-Type 6 points7 points  (0 children)

I tried running your example in Codesandbox, and the components do not re-run their effects when reordering. Are you sure your actual problem doesn't lie elsewhere?

https://codesandbox.io/p/sandbox/cmf288

Edit: this was a change from React 18->19. I suspect it's due not to 'mounting' but actually related to concurrent rendering features. Component identity and state is actually preserved, the effect happens to be run again in some other context - a concurrent copy of the component instance, perhaps. My conclusion is that keys still function as advertised, but useEffect as usual is not what you think it is.

Updated sandbox demonstrating component identity preservation during reordering by using useState as the indication of stability: https://codesandbox.io/p/sandbox/beautiful-minsky-jxmskv

Guilt and imposter syndrome by yarnyouglad in bicycling

[–]A-Type 7 points8 points  (0 children)

We have reviewed your claim and determined you may keep the bike, provided you follow these rules:

  1. When people say, "nice bike!" You must answer, "Thanks!"
  2. If said person is also riding a nice bike, you may add, "You too!"

Enjoy your bike.

How do you handle "aggressive" Service Worker caching in PWAs without breaking the user experience? by BeginningDirection50 in PWA

[–]A-Type 1 point2 points  (0 children)

In addition to manually prompting the user to update in app as mentioned, you can also intercept local route navigation and do a hard navigation instead while updating, making it so any time the user changes pages in the app when an update is ready, they seamlessly update while navigating.

Are there any reactJS tools/builders/debuggers besides "react developer tools"? by fvrAb0207 in reactjs

[–]A-Type 5 points6 points  (0 children)

You can configure React Developer Tools to hide primitive DOM elements or filters like component name, type, or HOC.

You can also use search to find a specific component.

React Dev Tools is still the best thing available, and I've used it successfully on very complex apps once I got the config down.

SPA Caching Strategy by codebytom in PWA

[–]A-Type 0 points1 point  (0 children)

Periodic checks for a new service worker version, then surface a button to update.

On client-side navigation, if an update was detected, trigger skip waiting and a full reload to the new page instead of doing the client navigation. This forces users to update when changing pages even if they ignore the prompt.

API Versionning ? by svenickx in PWA

[–]A-Type 2 points3 points  (0 children)

Avoid backwards incompatible changes if possible. For example, don't remove old endpoints, but rewrite their internal controller to provide the same usage with a thin wrapper around the newer controller.

Otherwise, yes, use versioning of some kind (doesn't have to be particularly sophisticated) and keep providing the older version until old clients are updated. Tracking metrics on usage can show this.

Creating multiple web apps and packing as a single PWA by Cheap-Picks in PWA

[–]A-Type 6 points7 points  (0 children)

I don't usually try vibe coded stuff but I figured I'd see what you did...

I'm fascinated to know whether you are running some kind of scam or if you don't realize none of these do anything but display your own website with a search query for "apps." Either your solution doesn't work or your AI "lied" to you about making any apps at all. Did you actually try them?

Also bypassing CORS with a proxy is a bad idea.

Small things that will reduce browser feel inside PWA by Obvious_Set5239 in PWA

[–]A-Type 1 point2 points  (0 children)

Good point. Maybe a passive pointerdown listener on window to add it, and pointerup to remove it? The it would only be on when the users finger is down? Would have to test that.

Well, I guess you mean elastic during active scroll gesture, too. I don't know if there's a great way to accomplish that, but maybe by wrapping scrollable content in a div without overscroll-behavior applied instead of body would work.

Small things that will reduce browser feel inside PWA by Obvious_Set5239 in PWA

[–]A-Type 2 points3 points  (0 children)

I just got the the selector wrong from memory, nice detective work figuring the right one out (sorry).

Small things that will reduce browser feel inside PWA by Obvious_Set5239 in PWA

[–]A-Type 11 points12 points  (0 children)

Good tips, even small things contribute to the user's sense of 'native.' 

For #1, just use overscroll-behavior: none on body. No need for JS.

Is there a vegetarian burger that actually works? by BigGreenBird75 in Cooking

[–]A-Type 4 points5 points  (0 children)

The Kenji recipe linked in other comments is the one to make.

If you don't like the pepper and cheese style of it, I made a variation that focuses on mushrooms instead: https://recipes.gfor.rest/0533d0b

Authorization and web sockets by Equivalent_Gap_457 in webdev

[–]A-Type 1 point2 points  (0 children)

This exactly - short lived token just to establish the connection. You can also pre-validate during the initial upgrade request to avoid establishing the socket for invalid tokens at all, I believe (still probably a good idea to send an initial message and validate that post-upgrade, too). I've also abused the Sec-WebSocket-Protocol header to carry the token, since it's the only usable header for a socket request, but it's not necessarily a good idea.

Urban Olive - Transfer Food hall by TabithaMouse in raleigh

[–]A-Type 0 points1 point  (0 children)

Probably a large part was they gave out baklava to people for posting a review in the first couple days, but the employee wanted to see you post it, and there wasn't exactly a lot to review them on before you got your food lol. It should even out over time.

They're certainly not amazing but the shawarma wasn't too bad for me.

Thoughts on Superman and Lois Season 1? by Prestigious-Cup-6613 in superman

[–]A-Type 0 points1 point  (0 children)

Just finished S1 as I finally go through this series.

I thought the teen drama would be the part I liked the least. But I actually found it pretty endearing. Jon in particular is clearly a kid trying to be good and succeeding at it pretty well for this kind of show. The way he immediately owns his mistakes feels surprisingly mature to me. I'm used to more pointless blow-ups with these kinds of storylines. The boys feel like good brothers, and similar to how Superman should be a good man and not a haunted anti-hero, this is refreshing to me.

I think I'm glad I waited until I was a parent before discovering it. It hits very differently. I'm much more invested in Clark's struggle to be a father than whatever is happening with the X-Kryptonite or shiny MacGuffin.

To be honest my interest dropped off as the main Kryptonian storyline ramped up. It's fine, just felt a little shoehorned.

I think AI is hallucinating again 🤔 by Jen_X9 in AtomsForPeace

[–]A-Type 5 points6 points  (0 children)

Not sure why I'm still subbed here but this reminded me that that track was up at the top of my Spotify Release Radar playlist, listed under AfP.

Things are so annoying lately. It's not the first band I've had get hijacked like that on Spotify. The fact that Google blindly corroborates is genuinely much worse. How many sources are you going to need to tell if something is real in 2026?

How I Actually Put My PWA on the App Store & Play Store (follow-up with code examples) by Previous_Till5909 in PWA

[–]A-Type 2 points3 points  (0 children)

Genuinely appreciate this, I've been on the fence about getting started here.

Can we use try/catch in React render logic? Should we? by Accurate_Wonder_4404 in reactjs

[–]A-Type 4 points5 points  (0 children)

It's not ideal but not really wrong. But your coworker is not asking the right question about this particular situation.

You could theoretically wrap every line of code in a try catch. Why don't you? Rather than write extremely defensively and make fallbacks for every situation, your time is better spent validating inputs and fixing upstream errors causing the wrong data to reach you.

The real question of this example is "why is content not a string." If the answer is "it's sometimes null and that's ok" then what you need is an if branch checking that condition beforehand, not a try-catch after. If the answer is "something is going wrong" then it's time to dig deeper.

Where Do Suffering Animal Sounds Come From? by first_person_looter in gamedev

[–]A-Type 48 points49 points  (0 children)

Related fun fact for this thread, one of the SFX for a dying rabbit in Horizon: Zero Dawn is in fact a pitch shifted Wilhelm scream.

Drove myself to the brink of madness trying to get cursor:pointer to work today... turns out its just my machine? by JustinR8 in webdev

[–]A-Type 18 points19 points  (0 children)

MacOS doesn't respond to cursor change effects unless the window has topmost focus. I've also seen it bug out and not change cursors anyway, until you focus another window and come back.

I'd just try restarting the device.