harrymohney / fungi-tech

0 stars 0 forks source link

Grow - Fungi-Tech #2

Open harrymohney opened 1 year ago

harrymohney commented 1 year ago

From a very broad stance, the relationships between the backend and frontend was a lot to work through on my own. Setting the proper scope for set timelines is something I need practice with as my skills develop. I spent the first couple days focused on the backend and didn't even touch one of the Models on the submitted work. Knowing the MVP and staying strictly focused on that work to start will be helpful moving forward.

Screenshot 2023-09-12 at 6 57 49 AM

This particular useEffect to fetch the strains was a last minute blocker in getting my Added Strains to display.

krabecb commented 1 year ago

Great work pushing through this grow! 🙌🏽 And yes, setting up the backend can take a couple days, depending on the models and anticipated CRUD functionality. Glad you started with the backend first, as that will allow you to test your endpoints in Postman! A good workflow to adopt! Perhaps creating a diagram of how the FE + BE connect can help as well!

This snippet looks good at a glance. I'm sure the setup for this took some time, but you've got the try/catch, async/await, fetch and checking response.ok and setting state. Only thing I would say is that it looks like fetchStrains is scoped to the useEffect. If that's the case, then you can omit creating a fetchStrains function and just have the logic within the anonymous arrow function for the useEffect.