I am using an Free API of Advice Slip and when I am fetching data from API on Button click some time it gives me the same result from API Response how can I manage to filter that if the API response is same as previous so call the API again. you can check the code below.
getAdvice = async () => {
this.setState({ advice: "", load: true });
await fetch("https://api.adviceslip.com/advice")
.then((response) => response.json())
.then((data) => {
this.setState({ advice: data.slip.advice, load: false })});
};