Loading animation avec Axios (react.js)
Résolu
Utilisateur anonyme
-
Utilisateur anonyme -
Utilisateur anonyme -
Bonjour,
existe t'il une solution pour afficher une animation de chargement lors de l'utilisation de Axios ?
voici mon code actuel pour une simple inscription :
existe t'il une solution pour afficher une animation de chargement lors de l'utilisation de Axios ?
voici mon code actuel pour une simple inscription :
handleSubmit(event) {
if (this.state.email === this.state.email02 && this.state.passwd === this.state.passwd02 && this.state.lastname !== '') {
const data = {email: this.state.email, passwd: this.state.passwd, lastname: this.state.lastname, firstname: this.state.firstname}
axios.post('http://XXX.XX.XX.192:XXXX/register', data)
.then(
response => {console.log(response);
this.props.history.push('/SignIn');
alert('You are almost one of us, click on the verification link sent by email to complete your registration.');
})
.catch(err => {console.log(err);})
} else if (this.state.email !== this.state.email02 ) {
console.log('email are not the same');
alert('email are not the same !');
} else if (this.state.passwd !== this.state.passwd02) {
console.log('password are not the same');
alert('password are not the same !');
} else {
console.log('Unknown Error');
alert('Unknown Error, please try again later');
}
}
Configuration: Linux / Firefox 74.0
A voir également:
- Axios loading
- Dp animation maker - Télécharger - Animation
- Logiciel d animation 2d gratuit - Télécharger - Divers Web & Internet
- Meetic loading ✓ - Forum Réseaux sociaux
- Application error: a client-side exception has occurred while loading www.leboncoin.fr (see the browser console for more information). - Forum Réseaux sociaux
- Windows is loading files - Forum Windows 7
2 réponses
une approche de ce genre serais elle la plus optimisée ?
: https://appdividend.com/2018/04/02/react-loading-spinner-example/
: https://appdividend.com/2018/04/02/react-loading-spinner-example/