Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const log = useCallback(({
target: {
name, id, value, checked
}
}, obj) => {
ref.current = [...ref.current, {
...obj,
guid: guid(),
timestamp: new Date().toISOString(),
name,
id,
value,
checked
}];
setHistory(ref.current);
}, [ref, setHistory]);