ucfopen / Materia

Engage students with easily embedded apps for online courses. Supercharge your course with compelling experiences and game mechanics.
https://ucfopen.github.io/Materia-Docs/
GNU Affero General Public License v3.0
36 stars 33 forks source link

Added retry: false to react queries with error states #1596

Closed clpetersonucf closed 1 month ago

clpetersonucf commented 1 month ago

Like the title says, adds retry: false to all instances of useQuery with a provided onError parameter. These queries have fallback behavior for error states, but the built-in retry mechanism for react query meant that error states were delayed by as much as 10-15 seconds as react query attempts its default 3 retries before failing. While useful in principle, the delays to error states feels real bad and could cause issues where a user continues to try interacting with the page when the server has already kicked them out.