Skip to content

Make use of sweetalert2 to pop up loading screen without pain

Notifications You must be signed in to change notification settings

wisnuciwun/LoadingScreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

LoadingScreen 🍎

+ 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 :

About

Make use of sweetalert2 to pop up loading screen without pain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published