TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: React-hook-tracer – A light-weight tracer for React hooks

2 点作者 oblosys超过 2 年前
The package allows you to trace hook events for a component by importing hooks from &#x27;react-hook-tracer&#x27; instead of &#x27;react&#x27;, and adding a `useTracer` call to the component. Traced events include state&#x2F;ref&#x2F;context updates, effects being run, and components getting rendered. The `useTracer` hook also returns a `TracePanel` component, which shows the current values of props, state &amp; refs in the component&#x27;s rendering.<p>Demo playground: <a href="https:&#x2F;&#x2F;codesandbox.io&#x2F;s&#x2F;github&#x2F;Oblosys&#x2F;react-hook-tracer&#x2F;tree&#x2F;demo&#x2F;apps&#x2F;react-hook-tracer-demo?file=&#x2F;src&#x2F;demos&#x2F;Demo.tsx" rel="nofollow">https:&#x2F;&#x2F;codesandbox.io&#x2F;s&#x2F;github&#x2F;Oblosys&#x2F;react-hook-tracer&#x2F;tr...</a>

暂无评论

暂无评论