Комментарии:
Hi, I noticed in this tutorial if we get an error in the fetch request after the list of items is loaded successfully initially our footer shows the number of list items from the items state as it is populated from the earlier successful fetch request so a simple fix that I did for this is that whenever we catch an error and set fetchError in the catch statement, I set state of items to an empty array setItems([ ]) so now if there's any error in the fetch request our footer element does not show the count of elements in it.
ОтветитьAmaizing tutorial how to handle erros in useEffect😊
ОтветитьGreat video, thanks for this. Q) Do you later on go into moving the fetch items into a separate module - A data access layer so to speak? as you might want to call the fetchItems from several different components if it was a larger app, and also make the isLoading / fetchError more generic. All great for a small app like this.
Ответитьthanks Dave for this amazing tutorial, just a question is there a difference between new bash and new power shell terminal for this tutorial
ОтветитьHey Dave , I am from India . I have learned a lot from your channel and I always follow your methods to solve my problems, really you are great. Thank you very much .
ОтветитьInstead of (async () => await fetchItems())();
can we directly call the function as fetchItems() ??
If so, then what is the difference between above two invoking methods.
Can you please explain.
Superb Dev you are doing a great job Love from India ❤
ОтветитьHey Dave, Please help me @ how to fetch data from Elasticssearch and display it on React table. I have already Created React Table, and I have data on Elasticsearch. but I don't know how to call API on React
ОтветитьIt's really unfortunate that I discovered your channel just recently. I have been following a 40-hour React course on Udemy, your content is vastly superior than that course. I really like how you teach real life scenarios rather than just writing the bare minimum code.
Really appreciate all the efforts 👍
great. thanks
ОтветитьDave in a rush of finding jobs . After completing react can i start learning node directly without learning redux. I had planned to learn it later. Does your node series uses redux anywhere?
Ответитьreact made simple.
ОтветитьHello Dave, I am really learning alot from your playlist, but now I am stuck because of an error, in the useEffect hook when I try to update the setItem(listItem) , the items is not getting updated as a result I am not able to use any array functions and the browser is showing nothing, can you help me on this.
ОтветитьA very thorough illustration of the use of the fetch API in react. Thanks, Dave
{2022-10-19}
Top
ОтветитьThank You
Ответитьeveryday I gain more experience by virtue of you , great thanks.
ОтветитьSomehow useEffect({}, []) with an empty array was always runs twice when I reload the page. Only fixed this after removing the react strict mode..
Ответитьgreat video Dave. Thank you. I do get a CORS error. my backend is running on 5000 and the frontend on 3000. I can see you are on 3500 and 3000 respectively with no issue?
ОтветитьI guess, instead of using (async () => await fetchItems())() in setTimeOut, I can simply use fetchItems(). Is it right? setTimeout(() => {
fetchItems()
}, 2000)
Excellent tutorial, please make a series of hook
Ответитьthank you sir
ОтветитьHow many episodes remain for the series ? :)
ОтветитьI always wondered why alt-z is used for text wrapping! just figured out that the z shape looks the perfect symbol for wrapping :)
I would rather use chrome dev tool/Network/Throttling dropdown list to simulate slow connection because I know I'm going to forget to remove the setTimeout() from the original code,
Thanks Dave, I really enjoyed it,