{"id":14968871,"url":"https://github.com/enesergun/remix-optimistic-and-pending","last_synced_at":"2026-02-17T15:30:56.154Z","repository":{"id":232274786,"uuid":"783913662","full_name":"enesergun/remix-optimistic-and-pending","owner":"enesergun","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-08T20:54:35.000Z","size":106,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-22T06:46:11.279Z","etag":null,"topics":["optimistic-ui","pending-u","remix-run","supabase-js"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enesergun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-08T20:29:33.000Z","updated_at":"2024-04-11T07:58:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"1fe35e79-049d-4dfc-962c-09a52148eee4","html_url":"https://github.com/enesergun/remix-optimistic-and-pending","commit_stats":null,"previous_names":["enesergun/remix-optimistic-and-pending"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/enesergun/remix-optimistic-and-pending","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enesergun%2Fremix-optimistic-and-pending","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enesergun%2Fremix-optimistic-and-pending/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enesergun%2Fremix-optimistic-and-pending/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enesergun%2Fremix-optimistic-and-pending/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enesergun","download_url":"https://codeload.github.com/enesergun/remix-optimistic-and-pending/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enesergun%2Fremix-optimistic-and-pending/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001761,"owners_count":26083171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["optimistic-ui","pending-u","remix-run","supabase-js"],"created_at":"2024-09-24T13:40:44.311Z","updated_at":"2025-10-09T16:07:52.012Z","avatar_url":"https://github.com/enesergun.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remix.run: Optimistic UI vs. Pending UI Comparison\n\n## Understanding Optimistic UI and Pending UI\nThe project explores two approaches to handling user interactions that involve server communication:\n\n- \u003cb\u003eOptimistic UI\u003c/b\u003e: Assumes the action will succeed and updates the UI immediately, potentially reverting later if there's an error.\n- \u003cb\u003ePending UI\u003c/b\u003e: Shows a visual cue (e.g., spinner) while waiting for the server response before updating the UI.\n\n## Choosing the Right Approach\n\n### Optimistic UI\n- Be optimistic! Assume the action will succeed.\n- When a user clicks a button, for example, update the UI right away to reflect the expected outcome (e.g., show the post as liked or the task added to the list).\n- In the background, send a request to the server to confirm the action.\n- If successful, great! The UI already reflects the change.\n- If there's an error (e.g., network issue), revert the UI change and inform the user.\n\nhttps://github.com/enesergun/remix-optimistic-and-pending/assets/63712936/1917172f-dd49-4ca7-b578-0f63bb170777\n\n### Pending UI\n- This is a more traditional approach.\n- When a user performs an action, show a visual cue that something is happening (e.g., a spinner or dimmed button).\n- This lets the user know the application is working on their request.\n- Once the server responds, update the UI accordingly.\n\n\nhttps://github.com/enesergun/remix-optimistic-and-pending/assets/63712936/d57995ad-3c56-46a2-8d0a-ff0b7031671b\n\n\n  \n### Choosing between them:\n1. Use optimistic UI for common actions that are likely to succeed to make the app feel faster.\n2. Use pending UI for actions that might fail or take longer, so users aren't confused by a sudden UI change.\n\n\n## Development\n\nRun the Vite dev server:\n\n```shellscript\nnpm run dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenesergun%2Fremix-optimistic-and-pending","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenesergun%2Fremix-optimistic-and-pending","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenesergun%2Fremix-optimistic-and-pending/lists"}