Skip to content

Commit f129051

Browse files
authored
Merge pull request #75 from sw-yx/basic-types-common-types
Update README.md
2 parents 2d0a8f4 + 343e5b3 commit f129051

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ export declare interface AppProps {
426426
children3: React.ReactChild | React.ReactChildren; // better, but doesnt accept strings
427427
children: React.ReactNode; // best, accepts everything
428428
style?: React.CSSProperties; // to pass through style props
429-
onChange?: (e: React.FormEvent<HTMLInputElement>) => void; // form events!
430-
props: Props & React.HTMLProps<HTMLButtonElement> // to impersonate all the props of a HTML element
429+
onChange?: React.FormEventHandler<HTMLInputElement>; // form events! the generic parameter is the type of event.target
430+
props: Props & React.PropsWithoutRef<JSX.IntrinsicElements['button']> // to impersonate all the props of a button element without its ref
431431
}
432432
```
433433

0 commit comments

Comments
 (0)