I installed react-toastr and integrated the example code.
import React from 'react'
import { ToastContainer } from 'react-toastr';
class Notifier extends React.Component
{
updateNotify()
{
this.refs.container.info('hola el mundo');
}
render()
{
return(
<ToastContainer ref="container"
className="toast-top-right" />
);
}
}
When I call info() on the container the message pops up, but just as plain text at the top of the page, not as a styled box in the upper right corner. The message also never goes away. So it looks like CSS and JavaScript components are missing.
What did I do wrong? Why those warnings about fsevents when this is being installed under Linux? I'm using react 15 if it matters. I downgraded to react-toastr version 2.9.5 but it didn't make a difference.
$ npm install --save react-toastr
myApp@0.3.1 /home/myApp
└─┬ react-toastr@3.0.0
└─┬ babel-runtime@6.26.0
├── core-js@2.5.3
└── regenerator-runtime@0.11.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.0.17 (node_modules/react-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})