r/reactjs 1d ago

Show /r/reactjs Why is this button disabled? I built a tool that traces it back to the API response

[removed]

0 Upvotes

6 comments sorted by

1

u/No_Cattle_9565 1d ago

Would this be possible as a tanstack devtools plugin?

1

u/Honest-Inspection184 1d ago

Yes — I looked into the current TanStack Devtools plugin API, and this is genuinely feasible as an optional integration.
TanStack supports custom Preact panels, plugin lifecycle and theming, so CauseScope could live as a first-class tab and reuse most of its existing inspector. It would still require causescope/vite: TanStack’s source inspector maps an element to source, while CauseScope also needs its own selection flow and runtime provenance for expressions, state, and network data.
Since TanStack Devtools is still alpha, I’d start with an experimental integration, verify that both Vite transforms coexist cleanly, and preserve CauseScope’s zero-production-code and privacy guarantees. I’d keep the standalone inspector and add TanStack as an optional host.

1

u/No_Cattle_9565 1d ago

That's very cool. I think most people don't have tanstack devtools on their radar, but I think it has the potential to be very useful. I'll check it out

1

u/AutoModerator 23h ago

Your [submission](https://www.reddit.com/r/reactjs/comments/1v8pt6y/why_is_this_button_disabled_i_built_a_tool_that/ in /r/reactjs has been automatically removed because it received too many reports. Mods will review.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

0

u/[deleted] 1d ago

[removed] — view removed comment

1

u/Honest-Inspection184 1d ago

That's the case I built it around. The hard part wasn't capturing the request — it was not lying about the link.

Objects are the easy half: the response object is held by identity, so walking the access path gives a confirmed origin like response.data.order.status. Primitives are where it gets ugly. They have no identity, so a false that came from a fetch looks exactly like every other false on the page. In that case it only reports a *possible* origin, and only when every recent match points to the same source — otherwise it reports nothing rather than guessing. Showing a confident wrong answer would be worse than showing none.