+ Short Documentation
🍚 Requirement :
- sweetalert2 (i am using 10.16.0 version)
👀 Usage :
- Put this file to your component directory folder. You can choose to make a new folder or not.
- import this component and place it after an AJAX call. use " .then() " and " .catch() ". (im using Axios)
☎️ Parameters :
- no need parameter, just call this function and magic happens :)
📎 Example :
onCallApi = async () => {
let url = 'api/blablabla'
let obj = this.state.data
await Axios.post(url, obj)
.then(LoadingHandling1()) //or use LoadingHandling2
.catch(err => {console.log(err))
}
📷 Preview :