{"id":20535039,"url":"https://github.com/jhuntdev/blest-react","last_synced_at":"2026-02-15T03:02:08.990Z","repository":{"id":174514510,"uuid":"652346381","full_name":"jhuntdev/blest-react","owner":"jhuntdev","description":"A React / React Native client for BLEST (Batch-able, Lightweight, Encrypted State Transfer), an improved communication protocol for web APIs which leverages JSON, supports request batching by default, and provides a modern alternative to REST.","archived":false,"fork":false,"pushed_at":"2025-11-25T15:34:17.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T19:24:15.260Z","etag":null,"topics":["api","blest","client","react","react-native","reactjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jhuntdev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-11T21:16:54.000Z","updated_at":"2025-11-25T15:34:20.000Z","dependencies_parsed_at":"2024-08-05T14:53:20.477Z","dependency_job_id":"dd2135a0-5312-4955-94a6-68a5a5404536","html_url":"https://github.com/jhuntdev/blest-react","commit_stats":null,"previous_names":["jhuntdev/blest-react"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jhuntdev/blest-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhuntdev","download_url":"https://codeload.github.com/jhuntdev/blest-react/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-react/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29466925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"online","status_checked_at":"2026-02-15T02:00:07.449Z","response_time":118,"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":["api","blest","client","react","react-native","reactjs"],"created_at":"2024-11-16T00:29:06.195Z","updated_at":"2026-02-15T03:02:08.980Z","avatar_url":"https://github.com/jhuntdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BLEST React\n\nA React client for BLEST (Batch-able, Lightweight, Encrypted State Transfer), an improved communication protocol for web APIs which leverages JSON, supports request batching by default, and provides a modern alternative to REST.\n\nTo learn more about BLEST, please visit the website: https://blest.jhunt.dev\n\n## Features\n\n- Built on JSON - Reduce parsing time and overhead\n- Request Batching - Save bandwidth and reduce load times\n- Compact Payloads - Save even more bandwidth\n- Single Endpoint - Reduce complexity and facilitate introspection\n- Fully Encrypted - Improve data privacy\n\n## Installation\n\nInstall BLEST React from npm\n\nWith npm:\n```bash\nnpm install --save blest-react\n```\nor using yarn:\n```bash\nyarn add blest-react\n```\n\n## Usage\n\nWrap your app (or just part of it) with `BlestProvider`.\n\n```javascript\nimport React from 'react'\nimport { BlestProvider } from 'blest-react'\nimport { uuidv9 } from 'uuid-v9'\n\nconst blestOptions = { // all optional\n  maxBatchSize: 25,\n  bufferDelay: 10,\n  httpHeaders: { Authorization: 'Bearer token' }\n  errorHandler: (error, retry) =\u003e {\n    console.error(error)\n    retry()\n  }\n  idGenerator: uuidv9\n}\n\nconst App = () =\u003e {\n  return (\n    \u003cBlestProvider\n      url='http://localhost:8080'\n      options={blestOptions}\n    \u003e\n      {/* Your app here */}\n    \u003c/BlestProvider\u003e\n  )\n}\n```\n\nUse the `useBlestRequest` hook to perform passive requests on mount and when parameters change.\n\n```javascript\nimport { useBlestRequest } from 'blest-react'\n\nconst MyComponent = () =\u003e {\n  const { data, loading, error } = useBlestRequest(\n    'listItems', // route\n    { limit: 24 }, // body\n    { select: ['edges', ['pageInfo', ['endCursor', 'hasNextPage']]] } // options\n  )\n\n  return (\n    // Your component here\n  )\n}\n```\n\nUse the `useBlestLazyRequest` hook to generate a request function you can call when needed.\n\n```javascript\nimport { useBlestLazyRequest } from 'blest-react'\n\nconst MyForm = () =\u003e {\n  const [submitForm, { data, loading, error }] = useBlestLazyRequest(\n    'submitForm', // route\n    { select: ['success'] } // options\n  )\n\n  const handleSubmit = (values) =\u003e {\n    submitForm(values)\n  }\n\n  return (\n    // Your form here\n  )\n}\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuntdev%2Fblest-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhuntdev%2Fblest-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuntdev%2Fblest-react/lists"}