sidevesh/react-native-snackbar-component

How to dismiss the snackbar

jamesangetonhouse opened this issue · 1 comments

I notice there is no sample code to dismiss the snackbar. Wondering how to do it?

Late to the party, but if someone else lands here:

When you set it to visible: true you need to setTimeout, in the case below it will go away after 3 seconds.

this.setState({visible: true}, () => {
                        setTimeout(()=> {
                            this.setState({visible: false})
                        }, 3000)
                    })