Releases: Oblosys/react-hook-tracer
Releases · Oblosys/react-hook-tracer
v1.4.0
v1.3.1
v1.3.0
Changes
- For
useReducer
, emit a'dispatch'
trace when dispatch gets called, rather than an'action'
trace when reduction starts. useTracer
now returns a stableTracePanel
that won't remount on each render.- Throw an error when
useTracer
is not the first hook function called in a traced component. - Fix warning and possible crash when a traced ref is mutated during a render.
- Custom show functions do not need to be stable anymore.
- Clean up demo styles.
v1.2.0
Changes
- Automatically trace to console when
TraceLog
is omitted. - Warn when
React.StrictMode
is active. Muting the extra strict-mode traces is not feasible, unfortunately. (Note that on CodeSandbox playgrounds, the warning only appears when the app is running in its own window.) - Fix & simplify trace-log & trace-panel styling.
v1.1.0
v1.0.1
v1.0.0
Features
- Trace support for:
useCallback
useContext
useEffect
useInsertionEffect
useLayoutEffect
useMemo
useRef
useState
TracePanel
component that shows used hooks and current values for props, state & refs.- Interactive
TraceLog
component that highlights trace origin in corresponding panel when hovering over traces. - Support for custom hook labels.
- The
useTracer
hook takes an optionalshowProps
function to customize how props appear in the log & trace panels. - Hooks that keep track of a value (
useContext
,useMemo
,useRef
, anduseState
) accept an optionalshow
function. - Custom
trace
function to log messages to trace-log. - Support for tracing to the browser console.
- Fully typed.
- Package contains both ESM & CommonJS modules.