So reagieren Sie die Typscript -Rückruffunktion
import * as React from 'react';
interface ToggleProps {
ClickHandler: (event: React.MouseEvent<HTMLButtonElement>) => void
}
export function Toggle(Props: ToggleProps) {
return <button onClick={Props.ClickHandler}>Toggle</button>
}
Daniel Kristoffersen