{"id":22973161,"url":"https://github.com/jderochervlk/fp-ts-remote-data","last_synced_at":"2025-08-13T14:33:02.300Z","repository":{"id":62706637,"uuid":"561570634","full_name":"jderochervlk/fp-ts-remote-data","owner":"jderochervlk","description":"https://jderochervlk.github.io/fp-ts-remote-data/","archived":false,"fork":false,"pushed_at":"2024-04-01T06:01:17.000Z","size":2142,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-04T04:06:09.588Z","etag":null,"topics":["fp","fp-ts","functional-programming","remote-data","typescript"],"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/jderochervlk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-11-04T01:26:29.000Z","updated_at":"2024-04-14T18:41:55.608Z","dependencies_parsed_at":"2024-02-03T19:29:17.441Z","dependency_job_id":"0c0ab23a-f948-4851-a5b2-46527a3f86c9","html_url":"https://github.com/jderochervlk/fp-ts-remote-data","commit_stats":{"total_commits":44,"total_committers":4,"mean_commits":11.0,"dds":0.5681818181818181,"last_synced_commit":"119b9ca0bf602efe5d2f8dbb58da2aae8f584948"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jderochervlk%2Ffp-ts-remote-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jderochervlk%2Ffp-ts-remote-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jderochervlk%2Ffp-ts-remote-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jderochervlk%2Ffp-ts-remote-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jderochervlk","download_url":"https://codeload.github.com/jderochervlk/fp-ts-remote-data/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229767274,"owners_count":18121042,"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","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":["fp","fp-ts","functional-programming","remote-data","typescript"],"created_at":"2024-12-14T23:39:57.001Z","updated_at":"2024-12-14T23:39:57.609Z","avatar_url":"https://github.com/jderochervlk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @jvlk/fp-ts-remote-data\n\nA library to make it easy to work with remote data. Compatible with the `fp-ts` ecosystem, but it's not required.\n\nRemoteData represents a value that can be in one of four states:\n\n- Loading\n- Error\n- Empty\n- Success\n\n[Read the full documentation](https://jderochervlk.github.io/fp-ts-remote-data/).\n\n## Example in React\n\n```tsx\nimport * as D from '@jvlk/fp-ts-remote-data'\nimport { pipe } from 'fp-ts/function'\n\nimport useBlogRequest from './useBlogRequest'\nimport Loading from './Loading'\nimport Error from './Error'\nimport Empty from './Empty'\nimport Blog from './Blog'\n\nfunction Component() {\n  const blog = useBlogRequest()\n\n  return pipe(\n    blog,\n    D.fold(\n        () =\u003e \u003cLoading /\u003e),\n        err =\u003e \u003cError error={err}\u003e,\n        () =\u003e \u003cEmpty/\u003e,\n        entries =\u003e \u003cBlog entries={entries}\u003e\n  )\n}\n```\n\n## Installation\n\nUsing NPM:\n\n```\nnpm i @jvlk/fp-ts-remote-data\n```\n\nUsing Yarn:\n\n```\nyarn add @jvlk/fp-ts-remote-data\n```\n\n## Thanks\n\nThe start of this repo began as a clone of https://github.com/sylcastaing/fp-ts-remote-data. I have modified it and diverged from it. That library is much more \"sound\" from a `fp-ts` types perspective, but I wanted to create something that was focused more on developer usability. I've removed many of the functions in favor of simplifying things. I have also added the 4th state of `empty` to avoid having to use a value of `Option` if the results don't contain any data.\n\nThe original concept of the RemoteData type comes from [How Elm Slays a UI Antipattern](http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjderochervlk%2Ffp-ts-remote-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjderochervlk%2Ffp-ts-remote-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjderochervlk%2Ffp-ts-remote-data/lists"}