Penultimate Zoo

Homework 3 Reflection

UI

I integrated the book editing and deletion using Material UI DataGrid inline editing. I chose it as to me editing using a table just made the most sense. The thing I struggled the most was implementing the delete in the UI, specifically getting the delete to work in the dialog confirmation. I was trying to use an example from the Materials UI documentation where it passed a function to the dialog component to remove a row from the grid, but the function kept firing on page render. So I changed it to pass the setState function instead of a custom function, and that seemed to work. Still not entirely sure why.

Material UI

It definitely took me a while to implement the table using Material UI, often having to look up and re-reeading the documentation for how to do things like a select option in a column. Pitfalls included having to get the right type, and the issue I mentioned in the previous question.

Editing endpoints

Creating the endpoint for editing and the associated tests were the least difficult part of the homework. My experience writing the POST endpoints before definitely made writing the editing endpoints smoother.