use-what-changed icon indicating copy to clipboard operation
use-what-changed copied to clipboard

Request: way to format printed output?

Open Benjin opened this issue 1 year ago • 0 comments

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.

Benjin avatar Jan 29 '24 19:01 Benjin