-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Since this is a macro, there’s little to no way to trace which references are placed in the inputs array.
An initial proposal syntax could be this:
function MyComponent() {
const { magnitude } = props;
const [counter, setCounter] = useState();
const handleClick = useAutoCallback(event => {
setCounter(counter * magnitude);
}, trace);
// ↑↑↑↑↑
}Which would output (on every render):
MyComponent › handleClick › useAutoCallback inputs: { counter: 0, magnitude: 4 }
┬ ┬ ┬ ─┬──────────────────────
│ │ │ │
│ │ └─ name of the macro └─ identifier name and
│ │ value for each input
│ │
│ └─ eventual name of the resulting variable
└─ name of the outer significant scope
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed