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. useTracernow returns a stableTracePanelthat won't remount on each render.- Throw an error when
useTraceris 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
TraceLogis omitted. - Warn when
React.StrictModeis 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:
useCallbackuseContextuseEffectuseInsertionEffectuseLayoutEffectuseMemouseRefuseState
TracePanelcomponent that shows used hooks and current values for props, state & refs.- Interactive
TraceLogcomponent that highlights trace origin in corresponding panel when hovering over traces. - Support for custom hook labels.
- The
useTracerhook takes an optionalshowPropsfunction to customize how props appear in the log & trace panels. - Hooks that keep track of a value (
useContext,useMemo,useRef, anduseState) accept an optionalshowfunction. - Custom
tracefunction to log messages to trace-log. - Support for tracing to the browser console.
- Fully typed.
- Package contains both ESM & CommonJS modules.