When building a React SPA, I configure Rails in API-only mode to skip view rendering, asset pipeline, and session cookies. The --api flag generates a lean Rails app focused on JSON responses. I enable CORS to allow the React dev server on localhost:5173 to communicate with Rails during development, while restricting origins in production. The rack-cors gem handles preflight OPTIONS requests automatically. I also configure Rails to use token-based authentication instead of session cookies since SPAs can't rely on same-origin cookie behavior. This setup provides a clean separation between backend API concerns and frontend presentation logic, making both easier to scale and deploy independently.