PitHub
HomeExplore
New pit
MCP serverSave straight from your agent
About usHow it worksFAQBlogContact us
Sign in
PitHub
Sign in
HomeExploreCreateSign in

Explore

Loading…

Explore

Tagged #react

ActiveNewMost usedRecommended
AllAI & Prompt Engineering324Engineering176Data & Analytics89Product4Design28Sales2Marketing4Finance24Strategy31Operations4Customer Success3People & Recruiting4Security & Compliance8Legal2Other Professional1
#reactClear filters
BEBen Brooks@benbrooks·2w ago

React state that keeps drifting: the version with actual constraints

The useful bit was asking for trade-offs and a smallest test before committing to a full plan.

Ben Brooks

Give me a short checklist for React state that keeps drifting. I want something I can run before I call the work done.

Claudeclaude-opus-4.5

Use this pass: - [ ] The goal is one sentence and names the user or decision - [ ] Inputs are current, relevant, and traceable - [ ] Assumptions are visible - [ ] Reproduce the failure before changing code - [ ] Keep the patch smaller than the diagnosis - [ ] Write the rollback before deployment - [ ] One failure case has been tested - [ ] The next owner and next action are clear If you cannot check an item, mark it unknown. Do not quietly treat unknown as done.

Show all 3 messages
3302.8k
BEBen Brooks@benbrooks·1mo ago

I asked Gemini for a second opinion on React state that keeps drifting

Sharing the wording because it gave me something I could check instead of a confident wall of text.

Ben Brooks

Be blunt about my plan for React state that keeps drifting. I am going to collect everything, ask for a polished answer, and fix details later. What is likely to go wrong?

Geminigemini-2.5-pro

Three things. - “Everything” has no boundary, so weak inputs and strong inputs will be treated alike. - A polished answer can hide missing evidence. Ask for gaps and assumptions before prose. - “Fix details later” means there is no acceptance test now. A safer sequence is: define the decision, choose the minimum trusted inputs, make an ugly first pass, check it, then polish. For this task, keep the patch smaller than the diagnosis.

Show all 3 messages
3302.7k
BEBen Brooks@benbrooks·2mo ago

A smaller way to tackle React state that keeps drifting

This started as a messy question about React state that keeps drifting. The follow-up made the answer practical.

Ben Brooks

For React state that keeps drifting, should I build a complete plan first or test one small slice? I have limited time and I do not want throwaway work.

ChatGPTgpt-5

Test one slice, but choose a slice that crosses the riskiest part of the problem. A tiny easy demo will only prove the easy part. Use this decision rule: - If reversing the choice is cheap, try it. - If the choice locks in data, money, or other people’s time, write the full decision first. - If uncertainty is concentrated in one step, test that step before planning around it. For React state that keeps drifting, make the first test produce evidence you can compare, not just something that looks complete.

Show all 3 messages
3404.2k
DIdivs before dawn@divs_before_dawn·2w ago

Finding the Suspense waterfall that added 900ms to our LCP

GPT-5 talked me through the React DevTools profile. The culprit was an await in a layout, not the page.

divs before dawn

LCP went from 1.1s to 2.0s after we adopted the app router. Bundle size barely moved. Where is the time going?

ChatGPTgpt-5

Bundle size being flat while LCP regresses points at a **request waterfall** rather than a payload problem. In the app router the usual cause is an `await` sitting in a layout. Layouts render before the pages nested inside them. If your root layout awaits anything, every page underneath waits for it before *starting* its own fetch — serially, not in parallel. Check your `layout.tsx` files first, outermost in. You're looking for any `await` that isn't wrapped in a Suspense boundary.

Show all 4 messages
400291
BEBen Brooks@benbrooks·2mo ago

The React state that keeps drifting prompt I actually kept

The useful bit was asking for trade-offs and a smallest test before committing to a full plan.

Ben Brooks

Help me find duplicated state and replace it with a single source of truth. Context: - Goal: [what a good result lets me do] - Current situation: [paste notes, draft, data, or constraints] - Audience: [who will use the result] - Deadline or limit: [time, budget, tools, length] Before answering, ask up to three questions only if the answers would materially change your recommendation. Otherwise, st

ChatGPTgpt-5

This is usable as written. The important parts are the definition of done, the instruction to expose assumptions, and the request for a smallest test. For React state that keeps drifting, I would start with these checks: - Reproduce the failure before changing code - Keep the patch smaller than the diagnosis - Write the rollback before deployment If you share real material, remove anything private first and replace bracketed fields with concrete details.

Show all 3 messages
3301.2k
BEBen Brooks@benbrooks·3mo ago

The checklist I use for React state that keeps drifting

A compact prompt and the response it produced. Replace the bracketed parts with your own details.

Ben Brooks

I am stuck on React state that keeps drifting. I need to find duplicated state and replace it with a single source of truth, but my current attempt is getting vague and too big. What would you check first?

Claudeclaude-opus-4.5

First, shrink the decision. Do not solve the whole subject at once. 1. Reproduce the failure before changing code. 2. Keep the patch smaller than the diagnosis. 3. Write the rollback before deployment. Write down the result you need by the end of this session. Then choose one input you trust and make a first pass that can be checked. If that pass fails, you will know which assumption to revisit instead of starting over.

Show all 3 messages
3402.6k

Browse by tag

#ai314#chatgpt211#claude208#gemini208#prompting182#agents174#context-engineering172#coding160
#debugging106
#software-learning100
#data85
#analysis55
#statistics55
#202650
#data-literacy50
#prompt-template50
#trending-questions50
#business25
#design25
#testing25
#automation21
#finance21
#cash-flow16
#research16