🦜
Size: a a a
🦜
🚀🚀
🦜
yv
🚀🚀
🚀🚀
🚀🚀
🦜
function cardClickHandler(e) {
e.preventDefault();
e.stopPropagation();
return e.currentTarget.dataset.agentName;
}
export const getReport = createEvent();
export const stopAgent = createEvent();
export const handleGetReport = getReport.prepend(cardClickHandler);
export const handleStopAgent = stopAgent.prepend(cardClickHandler);
import {handleGetReport,handleStopAgent}
<Card
onReport={handleGetReport}
onStop={handleStopAgent}
/>
🦜
🦜
🦜
🦜
🦜
R
onClick={event}
, это запихало всё реактовское событие в евент, и это событие таскалось по форвардам и эффектам.c
c
yv
const voidify = memoize(
(event) =>
event.prepend((e) => {
e.preventDefault()
e.stopPropagation()
})
)
🦜
🚀🚀
const voidify = memoize(
(event) =>
event.prepend((e) => {
e.preventDefault()
e.stopPropagation()
})
)
🦜