react-book
react-book copied to clipboard
[4.3 - pap/components/Notes.jsx] -"onDelete... dummy callback" question
After you update Notes.jsx with the delete functionality, you say:
"I defined a dummy callback for it [onDelete]."
I believe this is referring to the line:
export default ({notes, onDelete=() => {}})
This is probably picking nits, but the way I see it, there's actually no callback function defined, dummy or otherwise -- what I would call this is just defining an empty function so that onDelete is defined (i.e., not null), even if it is not provided by the caller.
Technically it will trigger onDelete
even if it's provided an empty function. I might have to rethink the section to eliminate the function. Thanks for bringing this up.