use-what-changed
use-what-changed copied to clipboard
Request: way to format printed output?
UWC is correctly detecting when dependencies change, but for some data types, e.g. functions or those without a useful toString()
, it'd be nice to be able to supply a function to format the printed UWC output.
Proposals:
useWhatChanged([person, (x) => x.FullName], [place, null);
or
useWhatChanged([person, place], [(person) => person.FullName, null]);
In both cases, person
has their print overridden to display the FullName
property and place
is left to its default.