I’ve finally finished my recipe box. The edit function was so hard to find I deleted everything and restarted the project again thinking that I made a mistake. Thankfully I got help from a member of this forum and learned something new. Anyway, here it is:
I cannot see your work on that pen.
When I inspected it, I received two main errors:
recipes.map is not a function
and Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
I’m sorry I don’t know enough yet to tell you more, but I hope this is helpful.
There is no validation. I can add a blank recipe.
Are you seeing it? I’m only seeing a blank page.
I get “Uncaught TypeError: recipe.ingredients.map is not a function” now.
I can see it now.
It looks good.
Sorry for the late reply. I saw your replies yesterday and made the necessary adjustments. Check it out now.
Hmm. Doesn’t appear to be doing anything.
What do you mean? It works for me.
I am seeing these errors:
I figured out the problem. You use “recipes” as the name for local storage. Unfortunately, another user used the same name for local storage so it did not read your recipes in. Once I gave it a unique name it worked.
It seems to be working ok now.
Thats why sometimes using prefixes to something that may collide on shared resources is quite a good choice.
Interesting! I didn’t know that about local storage. I guess I’ll have to be more creative with my naming.
Thank you for checking my project out.
Great advice! Thanks for the tip.