Torleif Berger

Results 62 comments of Torleif Berger

Why +1 for `useLatest`? I have a PR #1438 which solves several issues, including this one, and found using the updater function (your option B?) work pretty well. Unnecessary to...

> @Svish > > Yes, looks like your updater function solution would work pretty well, but it relies on user to memoize `options` object in order to keep `set` stable...

Seems the same warning is also triggered if I use view height/width instead of percent: ```js { position: 'absolute', height: '100vh', width: '100vw', } ```

I've found a workaround for now that gives same result, but without a warning, by using: ```jsx ```

Probably depends where it is and what it's inside of 🤷‍♂️

I need either this, or an `offset` I can supply. 😕

Just got the same error :cry: > Duplicate hash list entry: fl-45 [cachegrind.out.1457922047_674333.localhost__triangelos_music.txt](https://github.com/ceefour/wincachegrind/files/171377/cachegrind.out.1457922047_674333.localhost__triangelos_music.txt)

Extended example from #40851, which I hope could be solved with `oneof`: ```ts function useObjectWithSingleNamedKey( keyName: Key, value: string, fn: (obj: {[key in Key]: string}) => void) { fn({ [keyName]:...

@lukasvice Yep, I have the same issue. But, I think it needs to be fixed in `react-hook-form`, or at least in `@hookform/resolvers`, since it's not really a problem with `zod`....

@TonyGravagno RHF simply has a `DefsultValues` type helper, which recursively converts a given type into partials (making everything optional). Re your date issue, that's an issue with your own code....