5 ms·
Some really funny gems, and actually very true! This whole thing is incredibly humorous. And surprisingly, very pleasant to learn from. Please let me know the p
by truetraveller 1y ago
Some really funny gems, and actually very true! This whole thing is incredibly humorous. And surprisingly, very pleasant to learn from. Please let me know the prompt.
Quote1:
"useEffect is React's answer to the question, "How do we do side effects in functional components?" The answer, apparently, is "Confusingly, with lots of bugs, and in a way that makes developers question their sanity."...If React hooks were a family, useEffect would be the troubled teenager who means well but keeps setting the house on fire."
Quote2:
"ComponentDidMount's Evil Twin: In the before times, we had lifecycle methods that made sense...Clear, explicit, predictable. React looked at this and said, "What if we combined all of these into one confusing function called useEffect?""
Quote3:
"The Dependency Array of Doom: The second argument to useEffect is an array that determines when the effect runs. Sounds simple. It's not."
Quote4:
"Cleanup Functions: Forgetting Them Since 2019: useEffect can return a cleanup function. You'll forget to add it. Every. Single. Time."
Quote5:
"The Infinite Loop Trap: Want to crash a browser? useEffect makes it easy!"
- btown 1y agoThis makes me really want to know what would happen if you took the entirety of Dan Abramov's github comment history and transposed it to the style of Why's https://poignant.guide/ https://poignant.guide/ .
- DavidCanHelp 1y agoI actually captured the banter with Claude Code in https://github.com/cloudstreet-dev/React-is-Awful/blob/main/BANTER.md https://github.com/cloudstreet-dev/React-is-Awful/blob/main/...
- truetraveller 1y agoThanks! But I didn't see any hints to the AI about being sarcastic or humorous. Was the initial prompt the only prompt, or were there other prompts? What about per-chapter prompts? Or did the AI pump out the chapter names as well?
- DavidCanHelp 1y agoI just scrolled way, way back. Found the original Claude Code prompt: ```This folder exists to write a book. You're the author, and I'm guiding you in tech topics to write about. This book is called Reactive, and it has a unique twist: it is a book that teaches React to people who hate react, the idea of react, how react looks and behaves and all the downsides. Be wistful for alternatives but contrast the way things are done. Somebody who reads the book should be amused, entertained, and learn react programming. Write the book in markdown, with numbered files and one file per chapter. Make it a full book, with an index, table of contents, and all the classic sections (Introduction) a book would have.```
- truetraveller 1y agoIf that's the only prompt, that's honestly incredible.
- DavidCanHelp 1y agoKeep in mind the banter was a huge part of it, and this is claude code I was engaged with on the CLI.
- root_axis 1y agoThis style of writing seems awful to me.