Your context solution seems fine to me, if you use that value in multiple places. If you only use a context in a child, than I would just pass the value and the setter as a parameter to that child. Definitely not all shared state has to have a context around it.
comments
PS: Hope this is the right place to ask! I don't have a Stackoverflow account, and it's not like I have actual problems with this method either. I'd just like to know if there's problems with it that I don't know about π
I used to mainly develop in Delphi before my company said "You're doing React now, congrats!" and just sent me and other non-React developers off to build a whole new codebase by ourselves. Very interesting project and lots of lessons learned, but to this day there still are very few people at my company that actually know React, and even fewer people that know HTML. So there isn't really anyone who'd see the code and could say "Oh, don't do it like that". But that way I also don't really learn best practices, which is why I try to ask around π«£
Idk how true the benchmarks hold up in reality, but lets be honest you can program a server in ANY language/framework and it will be plenty fast for any of us (as long as you dont go out of your way to do stuff very wrong).
Unless your use case is maybe very unique and or you are serving hundreds of concurrent requests (which most aren't) all day long.
And so for my conclusion, you choose what you like (which should be Go hehe).
No worries, we really bad web developers have all switched to React long ago π So no CSS here, just Material-UI's "sx" attribute plastered over every single component.
Quite regularly, tbh.
I would argue grid, :has(), var(), and native nesting have been just as important steps forward.
You should only use import for local JSON that's in your code base. Using import against a remote resource seems like an obvious bad idea
Thatβs a three year history of accessibility incompetence from the OpenAI team. From the same company asking authors to use ARIA to better slurp / steal their content.
π

Slow-walk to plain scripting.
What an abomination
I'm just curious what kind of bad code is going to be around when this gets widespread.
.foo {
.nested {
property: value;
}
}
It should be like CSS5 by now with all the stuff theyβve added
@container and @scope were pretty big in my opinion.
JSSS had this 30 years ago!
When was the last time a feature this huge was added to CSS?
O.M.G. Finally!!!!
This doesn't seem to have any advantages over normal TSX components.
Click bait killer: Custom Elements Manifest.
things like oauth, binary websockets, loads of headers, etc all are way worse in curl than others. postman is terrible but there are plenty of other gui/cli options
I use xh. It's quite nice.
Or don't. Alternatives are available - often with nicer interfaces!
IMO the main reason to use curl is that Chrome lets you copy web requests as a curl command line.
I offer a compromise of using python's requests library. It's got most of the listed benefits, but I like python better than shell scripting.
It's weird that I've been seeing job posts that list postman as a required skill. It's not great.
I did use "Bruno" for a while to have a GUI for making requests. It was fine.
Hahaha I had not noticed, that is ten times better
I want to read more, but sadly curl is the only article on the site.