-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[@mantine/hooks] use-timeout: Memoize returned callbacks #4914
Conversation
|
||
useEffect(() => { | ||
if (options.autoInvoke) { | ||
start(); | ||
} | ||
|
||
return clear; | ||
}, [delay]); | ||
}, [clear, delay, options.autoInvoke, start]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reason to add options.autoInvoke to the dependencies array. start
should be called exactly once when hook is initialized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Raicuparta you did not resolve my comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want an effect here then?
The way it was before, changing the delay would also autoInvoke again, but changing the callback wouldn't. Was that intended? Because it seems very counterintuitive to me.
In this PR, changing the callback, the delay, or the autoInvoke option would trigger the autoInvoke again.
If the intention is to really only make it run exactly once, we should just have no dependencies at all, but then maybe it shouldn't be in an effect at all.
I have removed autoInvoke from the dependencies anyway to avoid making changes outside the scope of the PR, but this is pretty clearly against the intended useEffect usage as per the docs: https://react.dev/learn/removing-effect-dependencies.
(I also removed delay from the dependencies since it is now redundant)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh and yeah I didn't mean to make that first push that only removed the delay, sorry about the notification spam
Thanks! |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@mantine/core](https://mantine.dev/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fcore/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fcore/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fcore/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fcore/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fcore/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/dates](https://mantine.dev/dates/getting-started/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fdates/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fdates/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fdates/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fdates/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fdates/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/hooks](https://mantine.dev/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fhooks/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fhooks/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fhooks/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fhooks/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fhooks/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/notifications](https://mantine.dev/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fnotifications/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fnotifications/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fnotifications/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fnotifications/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fnotifications/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>mantinedev/mantine (@​mantine/core)</summary> ### [`v7.1.2`](https://togithub.com/mantinedev/mantine/releases/tag/7.1.2) [Compare Source](https://togithub.com/mantinedev/mantine/compare/7.1.1...7.1.2) - `[@mantine/dropzone]` Fix incorrect pointer events of inner element ([#​4934](https://togithub.com/mantinedev/mantine/issues/4934)) - `[@mantine/dropzone]` Fix broken exports from `react-dropzone-esm` package **Full Changelog**: mantinedev/mantine@7.1.1...7.1.2 ### [`v7.1.1`](https://togithub.com/mantinedev/mantine/releases/tag/7.1.1) [Compare Source](https://togithub.com/mantinedev/mantine/compare/7.1.0...7.1.1) ##### What's Changed - `[@mantine/core]` Radio: Fix description and error being misaligned when the component is rendered inside Radio.Group - `[@mantine/core]` HoverCard: Add missing `HoverCard.extend` - `[@mantine/core]` Drawer: Fix incorrect transitions in rtl direction ([#​4917](https://togithub.com/mantinedev/mantine/issues/4917)) - `[@mantine/core]` TagsInput: Fix incorrect IME keyboard input handling ([#​4947](https://togithub.com/mantinedev/mantine/issues/4947)) - `[@mantine/core]` Container: Fix nested Container components inheriting some properties from parent Container component ([#​4859](https://togithub.com/mantinedev/mantine/issues/4859)) - `[@mantine/core]` Menu: Fix incorrect Menu.Item rtl styles ([#​4936](https://togithub.com/mantinedev/mantine/issues/4936)) - `[@mantine/core]` Spoiler: remove margin-bottom when "Show more" is hidden ([#​4928](https://togithub.com/mantinedev/mantine/issues/4928)) - `[@mantine/dropzone]` Migrate to `react-dropzone-esm` package to support frameworks that work only with esm ([#​4920](https://togithub.com/mantinedev/mantine/issues/4920)) - `[@mantine/core]` Button: Fix incorrect border-radius of loading overlay ([#​4939](https://togithub.com/mantinedev/mantine/issues/4939)) - `[@mantine/core]` Portal: Fix error when value of `className` prop contained whitespace ([#​4935](https://togithub.com/mantinedev/mantine/issues/4935)) - `[@mantine/core]` MultiSelect: Fix incorrect input sizes values ([#​4925](https://togithub.com/mantinedev/mantine/issues/4925)) - `[@mantine/core]` Affix: Fix `position` prop set as attribute on the root element ([#​4932](https://togithub.com/mantinedev/mantine/issues/4932)) - `[@mantine/core]` Update `react-textarea-autosize` dependency to the latest version to fix issues with edge runtime ([#​4923](https://togithub.com/mantinedev/mantine/issues/4923)) - `[@mantine/core]` Select: Fix search value not changing when component value is controlled ([#​4915](https://togithub.com/mantinedev/mantine/issues/4915)) - `[@mantine/core]` Fix incorrect ActionIcon.Group, Button.Group and Rating components RTL styles ([#​4907](https://togithub.com/mantinedev/mantine/issues/4907)) - `[@mantine/core]` TagsInput: Fix `onOptionSubmit` not being called when tag is submitted with `Enter` key ([#​4892](https://togithub.com/mantinedev/mantine/issues/4892)) - `[@mantine/core]` NumberInput: Fix value reset to zero when leading non-zero number is deleted ([#​4916](https://togithub.com/mantinedev/mantine/issues/4916)) ##### New Contributors - [@​ShaifArfan](https://togithub.com/ShaifArfan) made their first contribution in [https://github.com/mantinedev/mantine/pull/4916](https://togithub.com/mantinedev/mantine/pull/4916) - [@​Yhprum](https://togithub.com/Yhprum) made their first contribution in [https://github.com/mantinedev/mantine/pull/4892](https://togithub.com/mantinedev/mantine/pull/4892) - [@​tatthien](https://togithub.com/tatthien) made their first contribution in [https://github.com/mantinedev/mantine/pull/4903](https://togithub.com/mantinedev/mantine/pull/4903) - [@​m074554n](https://togithub.com/m074554n) made their first contribution in [https://github.com/mantinedev/mantine/pull/4907](https://togithub.com/mantinedev/mantine/pull/4907) - [@​Raicuparta](https://togithub.com/Raicuparta) made their first contribution in [https://github.com/mantinedev/mantine/pull/4914](https://togithub.com/mantinedev/mantine/pull/4914) - [@​wuifdesign](https://togithub.com/wuifdesign) made their first contribution in [https://github.com/mantinedev/mantine/pull/4915](https://togithub.com/mantinedev/mantine/pull/4915) - [@​martis900](https://togithub.com/martis900) made their first contribution in [https://github.com/mantinedev/mantine/pull/4923](https://togithub.com/mantinedev/mantine/pull/4923) - [@​Jacouille](https://togithub.com/Jacouille) made their first contribution in [https://github.com/mantinedev/mantine/pull/4928](https://togithub.com/mantinedev/mantine/pull/4928) - [@​a-ryang](https://togithub.com/a-ryang) made their first contribution in [https://github.com/mantinedev/mantine/pull/4947](https://togithub.com/mantinedev/mantine/pull/4947) **Full Changelog**: mantinedev/mantine@7.1.0...7.1.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/dotkom/monoweb). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@mantine/core](https://mantine.dev/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fcore/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fcore/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fcore/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fcore/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fcore/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/dates](https://mantine.dev/dates/getting-started/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fdates/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fdates/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fdates/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fdates/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fdates/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/hooks](https://mantine.dev/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fhooks/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fhooks/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fhooks/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fhooks/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fhooks/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/notifications](https://mantine.dev/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fnotifications/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fnotifications/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fnotifications/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fnotifications/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fnotifications/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>mantinedev/mantine (@​mantine/core)</summary> ### [`v7.1.2`](https://togithub.com/mantinedev/mantine/releases/tag/7.1.2) [Compare Source](https://togithub.com/mantinedev/mantine/compare/7.1.1...7.1.2) - `[@mantine/dropzone]` Fix incorrect pointer events of inner element ([#​4934](https://togithub.com/mantinedev/mantine/issues/4934)) - `[@mantine/dropzone]` Fix broken exports from `react-dropzone-esm` package **Full Changelog**: mantinedev/mantine@7.1.1...7.1.2 ### [`v7.1.1`](https://togithub.com/mantinedev/mantine/releases/tag/7.1.1) [Compare Source](https://togithub.com/mantinedev/mantine/compare/7.1.0...7.1.1) ##### What's Changed - `[@mantine/core]` Radio: Fix description and error being misaligned when the component is rendered inside Radio.Group - `[@mantine/core]` HoverCard: Add missing `HoverCard.extend` - `[@mantine/core]` Drawer: Fix incorrect transitions in rtl direction ([#​4917](https://togithub.com/mantinedev/mantine/issues/4917)) - `[@mantine/core]` TagsInput: Fix incorrect IME keyboard input handling ([#​4947](https://togithub.com/mantinedev/mantine/issues/4947)) - `[@mantine/core]` Container: Fix nested Container components inheriting some properties from parent Container component ([#​4859](https://togithub.com/mantinedev/mantine/issues/4859)) - `[@mantine/core]` Menu: Fix incorrect Menu.Item rtl styles ([#​4936](https://togithub.com/mantinedev/mantine/issues/4936)) - `[@mantine/core]` Spoiler: remove margin-bottom when "Show more" is hidden ([#​4928](https://togithub.com/mantinedev/mantine/issues/4928)) - `[@mantine/dropzone]` Migrate to `react-dropzone-esm` package to support frameworks that work only with esm ([#​4920](https://togithub.com/mantinedev/mantine/issues/4920)) - `[@mantine/core]` Button: Fix incorrect border-radius of loading overlay ([#​4939](https://togithub.com/mantinedev/mantine/issues/4939)) - `[@mantine/core]` Portal: Fix error when value of `className` prop contained whitespace ([#​4935](https://togithub.com/mantinedev/mantine/issues/4935)) - `[@mantine/core]` MultiSelect: Fix incorrect input sizes values ([#​4925](https://togithub.com/mantinedev/mantine/issues/4925)) - `[@mantine/core]` Affix: Fix `position` prop set as attribute on the root element ([#​4932](https://togithub.com/mantinedev/mantine/issues/4932)) - `[@mantine/core]` Update `react-textarea-autosize` dependency to the latest version to fix issues with edge runtime ([#​4923](https://togithub.com/mantinedev/mantine/issues/4923)) - `[@mantine/core]` Select: Fix search value not changing when component value is controlled ([#​4915](https://togithub.com/mantinedev/mantine/issues/4915)) - `[@mantine/core]` Fix incorrect ActionIcon.Group, Button.Group and Rating components RTL styles ([#​4907](https://togithub.com/mantinedev/mantine/issues/4907)) - `[@mantine/core]` TagsInput: Fix `onOptionSubmit` not being called when tag is submitted with `Enter` key ([#​4892](https://togithub.com/mantinedev/mantine/issues/4892)) - `[@mantine/core]` NumberInput: Fix value reset to zero when leading non-zero number is deleted ([#​4916](https://togithub.com/mantinedev/mantine/issues/4916)) ##### New Contributors - [@​ShaifArfan](https://togithub.com/ShaifArfan) made their first contribution in [https://github.com/mantinedev/mantine/pull/4916](https://togithub.com/mantinedev/mantine/pull/4916) - [@​Yhprum](https://togithub.com/Yhprum) made their first contribution in [https://github.com/mantinedev/mantine/pull/4892](https://togithub.com/mantinedev/mantine/pull/4892) - [@​tatthien](https://togithub.com/tatthien) made their first contribution in [https://github.com/mantinedev/mantine/pull/4903](https://togithub.com/mantinedev/mantine/pull/4903) - [@​m074554n](https://togithub.com/m074554n) made their first contribution in [https://github.com/mantinedev/mantine/pull/4907](https://togithub.com/mantinedev/mantine/pull/4907) - [@​Raicuparta](https://togithub.com/Raicuparta) made their first contribution in [https://github.com/mantinedev/mantine/pull/4914](https://togithub.com/mantinedev/mantine/pull/4914) - [@​wuifdesign](https://togithub.com/wuifdesign) made their first contribution in [https://github.com/mantinedev/mantine/pull/4915](https://togithub.com/mantinedev/mantine/pull/4915) - [@​martis900](https://togithub.com/martis900) made their first contribution in [https://github.com/mantinedev/mantine/pull/4923](https://togithub.com/mantinedev/mantine/pull/4923) - [@​Jacouille](https://togithub.com/Jacouille) made their first contribution in [https://github.com/mantinedev/mantine/pull/4928](https://togithub.com/mantinedev/mantine/pull/4928) - [@​a-ryang](https://togithub.com/a-ryang) made their first contribution in [https://github.com/mantinedev/mantine/pull/4947](https://togithub.com/mantinedev/mantine/pull/4947) **Full Changelog**: mantinedev/mantine@7.1.0...7.1.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/dotkom/monoweb). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@mantine/core](https://mantine.dev/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fcore/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fcore/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fcore/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fcore/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fcore/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/dates](https://mantine.dev/dates/getting-started/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fdates/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fdates/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fdates/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fdates/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fdates/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/hooks](https://mantine.dev/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fhooks/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fhooks/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fhooks/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fhooks/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fhooks/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/notifications](https://mantine.dev/) ([source](https://togithub.com/mantinedev/mantine)) | [`^7.1.0` -> `^7.1.2`](https://renovatebot.com/diffs/npm/@mantine%2fnotifications/7.1.0/7.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fnotifications/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fnotifications/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fnotifications/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fnotifications/7.1.0/7.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>mantinedev/mantine (@​mantine/core)</summary> ### [`v7.1.2`](https://togithub.com/mantinedev/mantine/releases/tag/7.1.2) [Compare Source](https://togithub.com/mantinedev/mantine/compare/7.1.1...7.1.2) - `[@mantine/dropzone]` Fix incorrect pointer events of inner element ([#​4934](https://togithub.com/mantinedev/mantine/issues/4934)) - `[@mantine/dropzone]` Fix broken exports from `react-dropzone-esm` package **Full Changelog**: mantinedev/mantine@7.1.1...7.1.2 ### [`v7.1.1`](https://togithub.com/mantinedev/mantine/releases/tag/7.1.1) [Compare Source](https://togithub.com/mantinedev/mantine/compare/7.1.0...7.1.1) ##### What's Changed - `[@mantine/core]` Radio: Fix description and error being misaligned when the component is rendered inside Radio.Group - `[@mantine/core]` HoverCard: Add missing `HoverCard.extend` - `[@mantine/core]` Drawer: Fix incorrect transitions in rtl direction ([#​4917](https://togithub.com/mantinedev/mantine/issues/4917)) - `[@mantine/core]` TagsInput: Fix incorrect IME keyboard input handling ([#​4947](https://togithub.com/mantinedev/mantine/issues/4947)) - `[@mantine/core]` Container: Fix nested Container components inheriting some properties from parent Container component ([#​4859](https://togithub.com/mantinedev/mantine/issues/4859)) - `[@mantine/core]` Menu: Fix incorrect Menu.Item rtl styles ([#​4936](https://togithub.com/mantinedev/mantine/issues/4936)) - `[@mantine/core]` Spoiler: remove margin-bottom when "Show more" is hidden ([#​4928](https://togithub.com/mantinedev/mantine/issues/4928)) - `[@mantine/dropzone]` Migrate to `react-dropzone-esm` package to support frameworks that work only with esm ([#​4920](https://togithub.com/mantinedev/mantine/issues/4920)) - `[@mantine/core]` Button: Fix incorrect border-radius of loading overlay ([#​4939](https://togithub.com/mantinedev/mantine/issues/4939)) - `[@mantine/core]` Portal: Fix error when value of `className` prop contained whitespace ([#​4935](https://togithub.com/mantinedev/mantine/issues/4935)) - `[@mantine/core]` MultiSelect: Fix incorrect input sizes values ([#​4925](https://togithub.com/mantinedev/mantine/issues/4925)) - `[@mantine/core]` Affix: Fix `position` prop set as attribute on the root element ([#​4932](https://togithub.com/mantinedev/mantine/issues/4932)) - `[@mantine/core]` Update `react-textarea-autosize` dependency to the latest version to fix issues with edge runtime ([#​4923](https://togithub.com/mantinedev/mantine/issues/4923)) - `[@mantine/core]` Select: Fix search value not changing when component value is controlled ([#​4915](https://togithub.com/mantinedev/mantine/issues/4915)) - `[@mantine/core]` Fix incorrect ActionIcon.Group, Button.Group and Rating components RTL styles ([#​4907](https://togithub.com/mantinedev/mantine/issues/4907)) - `[@mantine/core]` TagsInput: Fix `onOptionSubmit` not being called when tag is submitted with `Enter` key ([#​4892](https://togithub.com/mantinedev/mantine/issues/4892)) - `[@mantine/core]` NumberInput: Fix value reset to zero when leading non-zero number is deleted ([#​4916](https://togithub.com/mantinedev/mantine/issues/4916)) ##### New Contributors - [@​ShaifArfan](https://togithub.com/ShaifArfan) made their first contribution in [https://github.com/mantinedev/mantine/pull/4916](https://togithub.com/mantinedev/mantine/pull/4916) - [@​Yhprum](https://togithub.com/Yhprum) made their first contribution in [https://github.com/mantinedev/mantine/pull/4892](https://togithub.com/mantinedev/mantine/pull/4892) - [@​tatthien](https://togithub.com/tatthien) made their first contribution in [https://github.com/mantinedev/mantine/pull/4903](https://togithub.com/mantinedev/mantine/pull/4903) - [@​m074554n](https://togithub.com/m074554n) made their first contribution in [https://github.com/mantinedev/mantine/pull/4907](https://togithub.com/mantinedev/mantine/pull/4907) - [@​Raicuparta](https://togithub.com/Raicuparta) made their first contribution in [https://github.com/mantinedev/mantine/pull/4914](https://togithub.com/mantinedev/mantine/pull/4914) - [@​wuifdesign](https://togithub.com/wuifdesign) made their first contribution in [https://github.com/mantinedev/mantine/pull/4915](https://togithub.com/mantinedev/mantine/pull/4915) - [@​martis900](https://togithub.com/martis900) made their first contribution in [https://github.com/mantinedev/mantine/pull/4923](https://togithub.com/mantinedev/mantine/pull/4923) - [@​Jacouille](https://togithub.com/Jacouille) made their first contribution in [https://github.com/mantinedev/mantine/pull/4928](https://togithub.com/mantinedev/mantine/pull/4928) - [@​a-ryang](https://togithub.com/a-ryang) made their first contribution in [https://github.com/mantinedev/mantine/pull/4947](https://togithub.com/mantinedev/mantine/pull/4947) **Full Changelog**: mantinedev/mantine@7.1.0...7.1.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/dotkom/monoweb). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Currently,
start
andclear
have unstable references, so they change every render. This makes them hard to use in effects, and cause unnecessary rerenders. This PR fixes that withuseCallback
.