Changes to the Back-End:
I updated the back-end API routes to include `/api` prefixes, added CORS headers for front-end communication, and improved validation for input data.
Validation Strategy:
I used both server-side and client-side validation. Client-side validation improved user experience, while server-side validation ensured data consistency and security.
State Management and useEffect:
Using `useEffect` was challenging, especially managing dependencies to avoid unnecessary re-renders. However, the hooks provided powerful state management for dynamic updates.
TypeScript Usage:
TypeScript caught several bugs related to API response types. While defining types manually was sometimes tedious, it ensured code quality and consistency.
Building an SPA with React provided a smoother, faster user experience compared to MPAs. React’s component reusability and state management made development more enjoyable, despite the initial learning curve.