react-native-root-toast
react-native-root-toast copied to clipboard
How can I change the default configuration?
How can I change the default configuration?
I think you can make a abstraction of Toast,for example
import Toast from 'react-native-root-toast'
export default class iToast {
static options = {
//default options
position: Toast.positions.CENTER,
}
static show(message, options = {}) {
Toast.show(message, Object.assign({}, iToast.options, options))
}
}