Hi guys, I'm new to JavaScript so I would like to ask, Is there any other way to fetch new advice without reloading the page? Anyway, feel free to suggest anything from the design and the javascript part. Thanks and have a great day!
Uttam Sharma
@uttamsharma446All comments
- @johnrookie-coderSubmitted over 2 years ago@uttamsharma446Posted over 2 years ago
Hey JOHNROOKIE, Great work :) but while fetching data you can show loading content for eg.
let loading=false;
const fetchData =()=>{ loading=true fetch(api).then(response=>response()).then(result=>{ loading=false; //store data
}).catch(err=>{})
}
if(loading){ //show loading
} else{ show data content }
Note: this fetch data method you can use on click as well on initial load of the page
0 - @nikeshnaikSubmitted over 2 years ago
To learn React and solve the previous issues of state management, this time started with Documentation of what to build and then start. Quickly built out layout and later for small changes local state was used.
Overall had fun while building it. Took 6 days to complete, started on 10th April.
Planning state management is a must to have React work with you. Lol.
@uttamsharma446Posted over 2 years agoYou've done very well please put every file and folder in an understandable way so anyone easily understands. check the tutorial related this on youtube
1 - @anoshaahmedSubmitted almost 3 years ago
Would appreciate any advice on where and how to get better. Thank you x