{"id":19705194,"url":"https://github.com/availity/availity-starter-react","last_synced_at":"2026-05-10T12:42:35.594Z","repository":{"id":42233274,"uuid":"191233526","full_name":"Availity/availity-starter-react","owner":"Availity","description":"Starter React Application using @availity/workflow","archived":false,"fork":false,"pushed_at":"2025-01-31T20:53:21.000Z","size":3354,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T21:28:21.197Z","etag":null,"topics":["react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Availity.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-10T19:33:35.000Z","updated_at":"2025-01-31T20:53:22.000Z","dependencies_parsed_at":"2024-07-05T21:19:11.421Z","dependency_job_id":"ff851035-bb5b-491f-a9cc-ebbbd7d62e77","html_url":"https://github.com/Availity/availity-starter-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Availity%2Favaility-starter-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Availity%2Favaility-starter-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Availity%2Favaility-starter-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Availity%2Favaility-starter-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Availity","download_url":"https://codeload.github.com/Availity/availity-starter-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241020434,"owners_count":19895440,"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":["react"],"created_at":"2024-11-11T21:26:46.653Z","updated_at":"2026-05-10T12:42:30.572Z","avatar_url":"https://github.com/Availity.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Availity Starter React\n\n\u003e Simple Template Project For React Web Apps on the Availity Portal\n\n## Resources\n\nThe following are links to documentation for building an app at Availity\n\n- [Availity GitHub Repositories](https://github.com/Availity)\n- [Availity Workflow Tutorial](https://availity.github.io/availity-workflow/)\n- [Availity Component Docs](https://availity.github.io/availity-react/)\n- [Availity JavaScript SDK Docs](https://availity.github.io/sdk-js/)\n\n## Usage\n\n### Running the App\n\nInstall the dependencies and run the app\n\n```bash\nyarn\nyarn start\n```\n\n### Data Fetching\n\nThis template uses `React Context` and `react-query` to handle state and data fetching. You can find more information about `React Context` [here](https://reactjs.org/docs/hooks-reference.html#usecontext) and `react-query` [here](https://react-query.tanstack.com/)\n\n#### Why this combo?\n\nMost web apps, especially at Availity, require fetching data. `react-query` provides many tools to allow for a better developer and user experience. It has easy to use loading states, error handling, and caching. We use `Context` as the state manager. `Context` does have potential scaling performance concerns, but these can normally be minimized with good design, data flow, and use of `react-query` caching.\n\n#### Quick Guide on `react-query`\n\nThe main concept to focus on when using `react-query` and its cache are the use of `keys`.\n\nEvery time this hook is called it will check if there is data available for the key `user`\n\n```js\nasync function fetchUser() {\n  return AvUsersApi.me();\n}\n\nconst useCurrentUser = () =\u003e useQuery('user', () =\u003e fetchUser());\n\nconst Component = () =\u003e {\n  const { data: user, isLoading } = useCurrentUser();\n\n  if (isLoading) return null;\n\n  return \u003cp\u003e{user ? user.name : 'A user has no name'}\u003c/p\u003e;\n};\n```\n\n\u003e Note: the `useCurrentUser` hook is available in [@availity/hooks](https://github.com/Availity/availity-react/tree/master/packages/hooks)\n\n`react-query` also exposes a `useMutation` hook. This helps with handling loading and error states more easily as there is no `useState` variable to toggle on off.\n\n```js\nasync function updateUser(variables) {\n  return updateUserInfo(variables);\n}\n\nconst Component = () =\u003e {\n  const { mutate, isLoading, error } = useMutation(updateUser);\n\n  return \u003cbutton onClick={() =\u003e mutate({ active: false })}\u003eDisable User\u003c/button\u003e;\n};\n```\n\n\u003e Note: the `SearchForm` component has an example of a `useMutation` in action\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaility%2Favaility-starter-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaility%2Favaility-starter-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaility%2Favaility-starter-react/lists"}