I just finished the first draft of my recipe box, and would love some feedback on it. I really enjoyed the challenge of this project. I tried to keep the state as simple as possible, starting out with the recipes array and the active recipe index as the only pieces of state. I ran into some issues with that because users might add a recipe, but then change their mind and abandon it. In that case, an empty recipe would have been added, and I didn’t think that looked very good. I only wanted to add a recipe if a user actually clicked the “save” button. So I gave the form it’s own state. I’m not sure if this is the proper way to do things in react, but it was fun making it work!
Nice! I’m in Struggletown with React at the moment, so anyone that can pull this off is a wizard in my eyes
Thank you! It was definitely challenging. Managing state was kind of tricky, even in a tiny app like this. I can only imagine how giant apps handle state. Thinking in React helped me a lot, along with working through their tutorial.
Nicely done Zack!! Added one more recipe