@dillon-porter
Posted
Hi Ismail,
I can try to help with the 2nd part. It might be a caching issue. You can try adding: {cache: "no-cache"} to the end of your fetch code.
For example, const { slip } = await (await fetch("https://api.adviceslip.com/advice", {cache: "no-cache"})).json();
@itbeginswithi
Posted
@dillon-porter Thanks Dillon for your suggestion,
The issue turned out to be due to React.strictMode which renders components twice (on dev but not production) in order to detect any problems with the code and warn you about them. Removing the React.strictMode from index.js solved the problem.