Menu

Post image 1
Post image 2
1 / 2
0

I built a Chrome extension that explains your console errors in plain English

DEV Community·Sola Samuel·22 days ago
#zMH1yan1
Reading 0:00
15s threshold

Here is an error message I got last week: Warning: Each child in a list should have a unique "key" prop. Check the render method of `ProductList`. at li at ProductList (webpack-internal:///./src/components/ProductList.jsx:34:5) Enter fullscreen mode Exit fullscreen mode I know what this error means. I've seen it a hundred times. I fixed it in thirty seconds. Here is a different error I got the same day: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'map') at processApiResponse (api.js:847:23) at async fetchProducts (api.js:112:5) Enter fullscreen mode Exit fullscreen mode I did not know what that one meant. Not immediately. The function at line 847 was calling .map() on something, and that something was undefined when it shouldn't have been. But why? Was the API returning a different shape? A race condition? A missing null check upstream? I spent twenty minutes on that error. I Googled it, read three Stack Overflow answers that all said "just add ?.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More