react-notifications
react-notifications copied to clipboard
Check the render method of `Notifications`.
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?
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';
getting same issue today,