react-notifications icon indicating copy to clipboard operation
react-notifications copied to clipboard

Check the render method of `Notifications`.

Open moonjoungyoung opened this issue 7 years ago • 2 comments

I am using node-js with react. When I import react-notification, I have a error message.

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `Notifications`.
    in Notifications (created by NotificationContainer)
    in NotificationContainer (at Notification.jsx:31)
...

my import code is like this.

import 'react-notifications/lib/notifications.css';
import { NotificationContainer, NotificationManager } from 'react-notifications';

I tried to fix this error by a month, but I failed.. Can somebody help me please?

moonjoungyoung avatar Oct 31 '18 05:10 moonjoungyoung

my import code is like this. it works fine const notifications = require('react-notifications'); // TODO: write typed definitions for this package. const { NotificationContainer, NotificationManager } = notifications; import 'react-notifications/lib/notifications.css';

Usama-Tahir avatar Apr 18 '19 08:04 Usama-Tahir

getting same issue today,

theshashiverma avatar Jan 22 '20 07:01 theshashiverma