{"id":21516467,"url":"https://github.com/nexys-system/react-headless","last_synced_at":"2025-07-03T17:10:22.100Z","repository":{"id":39886262,"uuid":"370799183","full_name":"nexys-system/react-headless","owner":"nexys-system","description":"React headless components","archived":false,"fork":false,"pushed_at":"2024-08-23T14:01:41.000Z","size":2621,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-29T20:48:02.627Z","etag":null,"topics":["data-table","list","nexys","react","react-components","reactjs","typescript","ui-independent"],"latest_commit_sha":null,"homepage":"https://nexys-system.github.io/react-headless","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nexys-system.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}},"created_at":"2021-05-25T18:59:19.000Z","updated_at":"2024-08-23T14:00:57.000Z","dependencies_parsed_at":"2025-04-09T20:43:39.001Z","dependency_job_id":"2fd24749-3810-475c-8505-caaa65ec9934","html_url":"https://github.com/nexys-system/react-headless","commit_stats":{"total_commits":275,"total_committers":3,"mean_commits":91.66666666666667,"dds":"0.42181818181818187","last_synced_commit":"814b63b1983879ce8eb3083d68e9e3e66b52dd6f"},"previous_names":["nexys-system/core-list"],"tags_count":106,"template":false,"template_full_name":null,"purl":"pkg:github/nexys-system/react-headless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexys-system%2Freact-headless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexys-system%2Freact-headless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexys-system%2Freact-headless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexys-system%2Freact-headless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nexys-system","download_url":"https://codeload.github.com/nexys-system/react-headless/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexys-system%2Freact-headless/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262667037,"owners_count":23345507,"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":["data-table","list","nexys","react","react-components","reactjs","typescript","ui-independent"],"created_at":"2024-11-24T00:21:27.067Z","updated_at":"2025-07-03T17:10:21.990Z","avatar_url":"https://github.com/nexys-system.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Headless components for React\n\n[![npm version](https://img.shields.io/npm/v/@nexys/headless)](https://www.npmjs.com/package/@nexys/headless)\n[![Publish](https://github.com/nexys-system/react-headless/actions/workflows/publish.yml/badge.svg)](https://github.com/nexys-system/react-headless/actions/workflows/publish.yml)\n[![Deployment](https://github.com/nexys-system/react-headless/actions/workflows/deploy.yml/badge.svg)](https://github.com/nexys-system/react-headless/actions/workflows/deploy.yml)\n\nReact headless components - Quickly build robust react apps\n\n- no UI dependencies\n- Minimal bootstrap implementation\n- Typescript, all props typed\n\n## Get started\n\n`yarn add @nexys/headless`\n\n## UI Components\n\nAll components fitting [`ui-type.ts`](https://github.com/nexys-system/react-headless/blob/master/src/lib/list/ui-type.ts) must be created for a particular design system.\n\nThen instantiate [`list-super`](https://github.com/nexys-system/react-headless/blob/master/src/lib/list/list-super.tsx) with the created UI components\n\nsee example [here](https://github.com/nexys-system/react-headless/commit/6e7df1eadab7ca14b99118a6a27dbb34c4eb859f#diff-25a6634263c1b1f6fc4697a04e2b9904ea4b042a89af59dc93ec1f5d44848a26)\n\n## Requests\n\nCreate a request function that extends https://github.com/nexys-system/react-headless/blob/master/src/lib/request/fetch.ts#L4\n\nbelow an untested implementation example:\n\n```\nconst request = \u003cA, B = any\u003e(\n  url: string,\n  method:Method = \"GET\",\n  data?: B\n): Promise\u003cA\u003e =\u003e {\n  try {\n    return fetchJSON(url, {method, data});\n  } catch (err) {\n    if(err.message) {\n      throw Error(err)\n    }\n    const {status, data}:{status:number, data?:any} = err;\n    \n    if (status === 401) {\n      // user unauthenticated, redirect to login?\n    }\n    \n    if (status === 403) {\n      // not enough permissions, display toast\n    }\n    \n    if (status === 500) {\n      // todo\n    }\n    \n    if (status === 400) {\n      return Promise.reject(data)\n    }\n  }\n}\n```\n\n## Associated Resources\n\n- [React I18n](https://github.com/nexys-system/react-i18n)\n\n## Old versions\n\n- [Material list](https://nexys-system.github.io/mui-list-ts/)\n- [React Material Components](https://github.com/nexys-system/react-material-component)\n- [React bootstrap](https://github.com/nexys-system/react-bootstrap-components)\n- [Tailwind React UI](https://github.com/nexys-system/tailwind-react-ui)\n- [React Stateful](https://github.com/nexys-system/react-stateful)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexys-system%2Freact-headless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexys-system%2Freact-headless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexys-system%2Freact-headless/lists"}