Settings

Theme

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

github.com

2 points by oblosys 3 years ago · 0 comments · 1 min read

Reader

The package allows you to trace hook events for a component by importing hooks from 'react-hook-tracer' instead of 'react', and adding a `useTracer` call to the component. Traced events include state/ref/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 & refs in the component's rendering.

Demo playground: https://codesandbox.io/s/github/Oblosys/react-hook-tracer/tr...

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection