Check Out My Recipe Box

Check Out My Recipe Box
0.0 0

#1

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:


#2

Hi,
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.


#3

There is no validation. I can add a blank recipe.


#4

Are you seeing it? I’m only seeing a blank page.


#5

I get “Uncaught TypeError: recipe.ingredients.map is not a function” now. :frowning:


#6

I can see it now.

It looks good.


#7

Sorry for the late reply. I saw your replies yesterday and made the necessary adjustments. Check it out now.


#8

Hmm. Doesn’t appear to be doing anything. :confused:


#9

What do you mean? It works for me.


#10

I am seeing these errors:
RecipeErrors

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. :+1:


#11

Thats why sometimes using prefixes to something that may collide on shared resources is quite a good choice. :slight_smile:


#12

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.


#13

Great advice! Thanks for the tip.