Name:
for example "Enable 2/5/10 sec rewind | Netflix"URL:
paste the script
other gists
🔗 TypeScript type toolbelt
🔗 React utils
- accessTrap - Object and Array Proxy to count number of property accesses to map used/unused properties. It maintains referential stability using a caching mechanism to not disrupt React.js render flow.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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} | |
* |
OlderNewer