mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
26.15k stars 1.85k forks source link

Notifications with strict mode (findDOMNode warning) #378

Closed zifeo closed 2 years ago

zifeo commented 2 years ago

Relates to https://github.com/mantinedev/mantine/issues/93 but in @mantine/notifications@3.1.4 (latest Safari).

notifications.showNotification({
  message: `Success!`,
});
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node
rtivital commented 2 years ago

We need to migrate @mantine/notifications to new ref api to remove this warning, feel free to submit a PR

bogordesaincom commented 2 years ago

same problem

bogordesaincom commented 2 years ago

any solution for this?, i'm search but still not found

Cheesetouched commented 2 years ago

Same issue. Is this patched in the latest release?

rtivital commented 2 years ago

No, until issue is closed it is not patched

rtivital commented 2 years ago

The issue is fixed, the fix will be released with 4.0 release

bogordesaincom commented 2 years ago

amazing @rtivital thanks

maticrivo commented 2 years ago

@rtivital is there an ETA on 4.0 release?

rtivital commented 2 years ago

End of march - mid april

rtivital commented 2 years ago

Released in 4.0

devkwaku commented 1 year ago

Issue present in @mantine/core": "^5.3.2"

Example code


import { useId } from '@mantine/hooks';
import InputMask from 'react-input-mask';

function Demo() {
  const id = useId();
  return (
    <Input.Wrapper id={id} label="Your phone" required>
      <Input component={InputMask} mask="+7 (999) 999-99-99" id={id} placeholder="Your phone" />
    </Input.Wrapper>
  );
}
rtivital commented 1 year ago

It is issue of react-input-mask package, not Mantine

devkwaku commented 1 year ago

react-input-mask@next fix the issue for me