minhtranite / react-notifications

Notification component for ReactJS
https://www.npmjs.com/package/react-notifications
287 stars 65 forks source link

Check the render method of `Notifications`. #41

Open moonjoungyoung opened 6 years ago

moonjoungyoung commented 6 years ago

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?

Usama-Tahir commented 5 years ago

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';

theshashiverma commented 4 years ago

getting same issue today,