Skip to content

Instantly share code, notes, and snippets.

View ackvf's full-sized avatar
🏡
Remote Fullstack Node.js / Frontend React.js

Qwerty (Vítězslav Ackermann Ferko) ackvf

🏡
Remote Fullstack Node.js / Frontend React.js
View GitHub Profile
@ackvf
ackvf / ComponentWithGenerics.ts
Last active December 8, 2023 00:17
React utils
// Jan 2023
/**
* Provides better intellisense for JSX Components at call-site by allowing them to accept additional generics.
*
* In some cases it also switches `onChange` handler from `(value: string) => void` to `(event: HTMLInputEvent<..>) => void`
* to be used with `useFormState()` hook's e.g. `onInputChange` which accepts `EventStub` (`(ev: { target: { name, value }}) => void`).
*
* @example
* interface FormState {a, b}
*
@ackvf
ackvf / README.md
Last active January 26, 2024 05:10
Crypto scripts