Closed Acrylic125 closed 1 year ago
This issue is stale because it has been open 1 day with no activity. Remove stale label or comment or this will be closed if it remains stale for 1 week.
This issue has been automatically closed because it received no activity for 1 week. If you think it was closed by accident, please leave a comment. Thank you.
Imrpvoements for #102
Feedback 1 - Use of the Link element
Use a Link element instead. If classes cannot be applied, you can also wrap a button with the classes, then wrap that with a Link.
Feedback 2 - Use of dependencies in
useEffect
Never use a useEffect hook without dependencies. This is prone to bugs lol. Anyways, use a useMutation hook and pass in an onSuccess callback to route the user back.
Feedback 3 - Data fetching standardisation
Refer to #112
Feedback 4 - Data control
Have the parent component pass down the parsed data instead.
Feedback 5 - React query error handling
Consider moving these mutations inside a useMutation hook so your error handling code can be done through onSuccesses, onError etc.