{"id":42121347,"url":"https://github.com/oolio-group/rn-use-modal","last_synced_at":"2026-01-26T14:33:22.376Z","repository":{"id":38949777,"uuid":"292522019","full_name":"oolio-group/rn-use-modal","owner":"oolio-group","description":"React hook for showing modals on react-native. Using useModal you can show any component as modal","archived":false,"fork":false,"pushed_at":"2025-11-04T05:33:28.000Z","size":197,"stargazers_count":4,"open_issues_count":11,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-11-04T07:14:15.982Z","etag":null,"topics":["hooks","modal","modal-dialogs","portal","react","react-hooks","react-native","usemodal"],"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/oolio-group.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-03T09:15:22.000Z","updated_at":"2025-06-25T00:29:32.000Z","dependencies_parsed_at":"2023-09-12T09:42:06.298Z","dependency_job_id":"9be50941-36e9-4ebb-92c2-80d95d085c60","html_url":"https://github.com/oolio-group/rn-use-modal","commit_stats":null,"previous_names":["oolio-group/rn-use-modal","hitz-group/rn-use-modal"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/oolio-group/rn-use-modal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oolio-group%2Frn-use-modal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oolio-group%2Frn-use-modal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oolio-group%2Frn-use-modal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oolio-group%2Frn-use-modal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oolio-group","download_url":"https://codeload.github.com/oolio-group/rn-use-modal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oolio-group%2Frn-use-modal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28780349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hooks","modal","modal-dialogs","portal","react","react-hooks","react-native","usemodal"],"created_at":"2026-01-26T14:33:21.710Z","updated_at":"2026-01-26T14:33:22.371Z","avatar_url":"https://github.com/oolio-group.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @oolio-group/rn-use-modal\n\nReact hook for showing modals on react-native. Uses `react-native-modal` under the hood. Show any component as modal with `showModal`\n\n[![codecov](https://codecov.io/gh/oolio-group/rn-use-modal/branch/master/graph/badge.svg?token=PINPV73BX8)](https://codecov.io/gh/oolio-group/rn-use-modal) [![npm](https://img.shields.io/npm/v/@oolio-group/rn-use-modal/latest.svg)](https://www.npmjs.com/package/@oolio-group/rn-use-modal) ![Build](https://github.com/oolio-group/rn-use-modal/workflows/Unit%20Tests%20and%20ESLint/badge.svg)\n\n## Why\n\n- Following recent trends `useModal` fits right in\n- There are some libraries already, but few of them allows dynamic content for modals.\n\n## Usage\n\n```js\nimport { useModal } from '@oolio-group/rn-use-modal';\n\nfunction ScreenWithModal() {\n  const { showModal, closeModal } = useModal();\n\n  const onConfirm = useCallback(() =\u003e {\n    closeModal();\n  }, [closeModal]);\n\n  const showConfirmation = useCallback(() =\u003e {\n    showModal(\u003cConfirmationModal onConfirm={onConfirm} /\u003e);\n  }, [showModal]);\n\n  return \u003cPressable onPress={showConfirmation}\u003eConfirm Me\u003c/Pressable\u003e;\n}\n```\n\n## ModalProvider\n\nYou need to wrap your screen with `ModalProvider` first for `useModal` to work.\n\n```js\nfunction App() {\n  return (\n    \u003cModalProvider modalProps={options}\u003e\n      \u003cScreenWithModal /\u003e\n    \u003c/ModalProvider\u003e\n  );\n}\n```\n\nFor a list of options [see this page](https://github.com/react-native-community/react-native-modal#available-props)\n\n## Caveats\n\nThis module currently uses `react-native-modal` under the hood. Considering life cycle of open source libraries it would be bettor to implement `Modal` from `react-native` directly.\n`react-native-modal` was chosen as of now to support web platforms also. This can be done by aliasing `react-native-modal` with `modal-enhanced-react-native-web`\n\n## Development\n\n### Build\n\nBuild all projects `yarn build`\nClean build output `yarn clean`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foolio-group%2Frn-use-modal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foolio-group%2Frn-use-modal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foolio-group%2Frn-use-modal/lists"}