PeterMyer / Byte-RecipeReader

Program to generate an accurate recipe ingredients, instructions, and nutrition label from a cook book recipe image
https://byte-recipe-reader.herokuapp.com/
1 stars 0 forks source link

Parent state of Ingredients not setting on first render in 'verifyImgTxt.js' #27

Closed PeterMyer closed 1 year ago

PeterMyer commented 1 year ago

Bug fixed.

Parent Editor State was originally set to be updated with a useState call on render of each sub-editor. However this was either overwriting or failing to update on the first render until accessed by users. Bug caused top-level editor state to return empty. Adding helper function and updated logic to set all editor states within parent in the initial useState instead.