ashark
Joined 12 years ago
Joined 12 years ago
You can still do this with React. Some of the most-common general-purpose libraries for working with React aren't that big and could be written from scratch pretty easily. If you recognize when something's entire purpose is apparently to replicate OO features while staying "purely" functional by jumping through a series of awkward hoops, you can recall that the language you're writing in does, in fact, support OOP, and avoid the library altogether by using built-in language features (I keep seeing this in the React ecosystem and it drives me nuts).
Probably use Redux because everyone and everything expects that you are. It's easy to understand if you ignore their bad terminology and go in knowing it's just an event/messaging system, more or less. Action = event. "Action creator" = anything that dispatches an event. Reducer = your event handlers. Exactly what you'd expect from an event system with centralized event handling. Utterly mundane and non-magical. Figure out how to leverage "combineReducers" to keep your file structure sane and just go. The closest thing it has to magic going on is that when an event comes through it checks to see whether any of the refs in your "state tree" changed as a result of that event, and triggers re-renders on relevant connected view(s) (React views, in your case). That's it. Note that with a very little creativity one can decouple one's Redux code and most/all of one's business logic into its own library to share it between React and React Native.
If you use React Native, you're in for a treat if you're used to fully native cross-platform dev. It really does a great job of rounding off the many, many rough corners on Android that make it such a pain-in-the-ass to work with. Warning: the ecosystem's kinda nutty and does a bad job of keeping in sync, so avoid dependencies that directly target React Native as much as possible if you want to ever be able to, say, upgrade your React Native version without breaking everything. Pure JS libs that have no truck with React Native, good. Libs that add narrowly-scoped extra native integration for RN, usually good. Mostly JS libs that add on to React Native itself, typically just a disaster waiting to happen, no matter how nice they seem at first.
Oh, and use Typescript. For the love of god use Typescript. Just start the project with it, and never look back.
- Richard Yates, Revolutionary Road, 1961
I don't wanna go dig through my copy to find it right now, but there's also a pretty long bit where he describes how most of the "work" that most of the "workers" at his (the character, Frank Wheeler's) firm do is making brief comments on various proposals or memos or whatever then sending them off to other people for their comments, trying to avoid being caught with the hot potato and actually having to do whatever's being proposed. They're all very good at it.
Again, written in 1961.
Similarly, and especially given our two-party system in the US, following every twist and turn in a political race is pure entertainment, of exactly no more value to you or anyone else than watching soap operas. You can make an as-informed-as-it-needs-to-be decision by spending that time on building up foundational knowledge instead, then catching up on the happenings of the race and the candidates' positions an hour before you go vote.
Electoral punishment for gaming the system to extreme levels, and even for misconduct that has no benefit for a party or candidates image or efficacy (blatant corruption, Roy Moore-type behavior [edit, 1]) has proven to be non-existent. The more various candidates and officials push, the farther it's clear they can go without punishment. Things are getting worse because they keep trying to push farther, and succeeding.
This is largely because of wedge issues—especially abortion, but also guns to a lesser extent. The problem won't go away unless we modify our election system to permit more than two viable parties at a time, so that, say, an anti-abortion party can go way off the rails and its saner voters can defect to another anti-abortion party, without losing anti-abortion voting power in legislative bodies (as, say, a protest vote would), and so on for every other issue. Proportional representation or something along those lines would help a lot. Most any effective change like this would also eliminate or greatly reduce the power of gerrymandering.
[1] Nearly non-existent—he did lose, after all, but narrowly.
My wife sometimes watches a video then leaves the "next video" running in the background while she does other stuff. Often it's people talking about movies in clickbait-titled videos. Their primary skill seems to be talking for several minutes without actually saying anything, and avoiding the video title's topic for as long as possible. It's kind of impressive, but does nothing to enrich anyone's life and drowns out better content with worse SEO.
Perhaps significantly, management positions aren't represented by the state workers' union, which is the only thing (barely) insulating the lower level workers from that insanity.