Closed rhazegh closed 6 years ago
:wave: @rhazegh
you forgot to connect your MyClass
component to your redux store to dispatch actions. See the example in the README: https://github.com/LouisBarranqueiro/reapop#in-a-react-component
you need to do something like this:
export default connect(null, {notify})(MyClass);
@LouisBarranqueiro Thank you so much. That took me one step closer to the solution. I added the connect and then I discovered that <NotificationSystem theme={theme}/>
was also missing from the top level component (I inherited this code), so I added it:
// ...
import NotificationsSystem from 'reapop';
import 'font-awesome/css/font-awesome.min.css';
import theme from 'reapop-theme-wybo';
// ...
class AppView extends Component {
// ...
render() {
// ...
return (
<div>
<NotificationsSystem theme={theme}/>
<Fragment>
{/*...*/}
</Fragment>
</div>
);
}
}
export default withRouter(connect(..., ...)(AppView));
When the page loads there is a warning:
Now I can see the notification is dispatched when I click the button (I see it in the Redux DevTool but I still don't see it on the screen):
there is also a warning on the console like this:
Any clue where to look, at this point? Does it have anything to do with CSS? FontAwesome? Or something else that I should look into?
Configuration
Actual behavior
I don't see any pop up messages. The console.log shows that the code has been reached and is run. Where should I look? How do I know why the popup is not showing up?
Expected behavior
See the message in a popup.
Steps to reproduce the behavior
Click on the PUSH HERE button, with the following setup: