{"id":17084526,"url":"https://github.com/nsaunders/react-router-promises","last_synced_at":"2026-05-01T10:32:46.088Z","repository":{"id":57343840,"uuid":"69390350","full_name":"nsaunders/react-router-promises","owner":"nsaunders","description":"Adapts react-router hooks to promises instead of callbacks.","archived":false,"fork":false,"pushed_at":"2019-05-24T23:11:53.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-12T17:57:18.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nsaunders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-27T19:17:16.000Z","updated_at":"2017-05-19T17:25:51.000Z","dependencies_parsed_at":"2022-09-12T06:30:43.524Z","dependency_job_id":null,"html_url":"https://github.com/nsaunders/react-router-promises","commit_stats":null,"previous_names":["therealnicksaunders/react-router-promise-adapters"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nsaunders/react-router-promises","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsaunders%2Freact-router-promises","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsaunders%2Freact-router-promises/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsaunders%2Freact-router-promises/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsaunders%2Freact-router-promises/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsaunders","download_url":"https://codeload.github.com/nsaunders/react-router-promises/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsaunders%2Freact-router-promises/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32494270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":[],"created_at":"2024-10-14T13:07:48.583Z","updated_at":"2026-05-01T10:32:46.065Z","avatar_url":"https://github.com/nsaunders.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-router-promises\nAdapts react-router hooks to promises instead of callbacks.\n\nInstead of this:\n```\nfunction loadUsersIntoStore(nextState) {\n  return new Promise((resolve, reject) =\u003e {\n    // fetch user listing and add it to the data store\n  });\n}\n\nfunction loadUsersOnEnter(nextState, replace, callback) {\n  loadUsersIntoStore(nextState).then(callback);\n}\n\nfunction loadUsersOnChange(prevState, nextState, replace, callback) {\n  loadUsersIntoStore(nextState).then(callback);\n}\n```\n```\n\u003cRoute path=\"/users\" component={UserListing} onEnter={loadUsersOnEnter} onChange={loadUsersOnChange} /\u003e\n```\n\nThis library will allow you to do this:\n```\nimport { enter, change } from 'react-router-promises';\n\nfunction loadUsersIntoStore(nextState) {\n  return new Promise((resolve, reject) =\u003e {\n    // fetch user listing and add it to the data store\n  });\n}\n```\n```\n\u003cRoute path=\"/users\" component={UserListing} onEnter={enter(loadUsersIntoStore)} onChange={change(loadUsersIntoStore)} /\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsaunders%2Freact-router-promises","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsaunders%2Freact-router-promises","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsaunders%2Freact-router-promises/lists"}