How would I import this in react-native

I would like to use this module in my react project:

According to the manual, I would need to do:

var MessageBarAlert = require('react-native-message-bar').MessageBar;
var MessageBarManager = require('react-native-messagebar').MessageBarManager;

My question is how to change this to a proper import statement?


1 answer

  • answered 2017-11-12 20:06 TimH

    import { MessageBarManager, MessageBar } from 'react-native-message-bar';