{"id":19269302,"url":"https://github.com/listenzz/react-native-toast-hybrid","last_synced_at":"2025-05-07T08:21:41.575Z","repository":{"id":32506055,"uuid":"135275532","full_name":"listenzz/react-native-toast-hybrid","owner":"listenzz","description":"A toast that can be used for react-native, while available for native android and ios","archived":false,"fork":false,"pushed_at":"2024-10-06T06:40:32.000Z","size":20156,"stargazers_count":33,"open_issues_count":8,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T15:43:58.326Z","etag":null,"topics":["react-native","toast"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/listenzz.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":"2018-05-29T09:49:11.000Z","updated_at":"2025-01-26T23:17:49.000Z","dependencies_parsed_at":"2024-10-24T08:32:06.958Z","dependency_job_id":"d76a2017-77c3-4100-b364-38b6a6040b53","html_url":"https://github.com/listenzz/react-native-toast-hybrid","commit_stats":{"total_commits":126,"total_committers":3,"mean_commits":42.0,"dds":"0.015873015873015928","last_synced_commit":"3cdf33b4cf790b94fd6e4da11545f6ca68fc9100"},"previous_names":["listenzz/react-native-hud-hybrid"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/listenzz%2Freact-native-toast-hybrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/listenzz%2Freact-native-toast-hybrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/listenzz%2Freact-native-toast-hybrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/listenzz%2Freact-native-toast-hybrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/listenzz","download_url":"https://codeload.github.com/listenzz/react-native-toast-hybrid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590573,"owners_count":21772936,"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-native","toast"],"created_at":"2024-11-09T20:19:22.591Z","updated_at":"2025-05-07T08:21:41.543Z","avatar_url":"https://github.com/listenzz.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-toast-hybrid\n\nA toast that can be used for react-native, while available for native android, ios.\n\n![ios-hud](./screenshot/ios-hud.gif)\n\n## Installation\n\n```\nyarn add react-native-toast-hybrid\n```\n\n## Usage\n\n[example](https://github.com/listenzz/react-native-toast-hybrid/blob/master/example/App.js)\n\n```js\n// Use in react code.\n\nimport { useToast } from 'react-native-toast-hybrid'\n\nconst toast = useToast()\n\ntext() {\n    toast.text('Hello World!!')\n}\n\ninfo() {\n    toast.info('A long long message to tell you.')\n}\n\ndone() {\n    toast.done('Work is done!')\n}\n\nerror() {\n    toast.error('Maybe somthing is wrong!')\n}\n```\n\nAs the word **Hybrid** implies, use in native is also supported.\n\n```objc\n\n// Use in iOS native code\n\n- (IBAction)showText:(UIButton *)sender {\n    [Toast text:@\"Hello Native!\"];\n}\n\n- (IBAction)showInfo:(UIButton *)sender {\n    [Toast info:@\"A long long message to tell you.\"];\n}\n\n- (IBAction)showDone:(UIButton *)sender {\n    [Toast done:@\"Work is done!\"];\n}\n\n- (IBAction)showError:(UIButton *)sender {\n    [Toast error:@\"Maybe somthing is wrong!\"];\n}\n\n```\n\n```java\n// Use in Android native code\n\nroot.findViewById(R.id.text).setOnClickListener(v -\u003e {\n    Toast.text(requireActivity(), \"Hello Native!\");\n});\n\nroot.findViewById(R.id.info).setOnClickListener(v -\u003e {\n    Toast.info(requireActivity(), \"A long long message to tell you.\");\n});\n\nroot.findViewById(R.id.done).setOnClickListener(v -\u003e {\n    Toast.done(requireActivity(), \"Work is done!\");\n});\n\nroot.findViewById(R.id.error).setOnClickListener(v -\u003e {\n    Toast.error(requireActivity(), \"Maybe somthing is wrong!\");\n});\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flistenzz%2Freact-native-toast-hybrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flistenzz%2Freact-native-toast-hybrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flistenzz%2Freact-native-toast-hybrid/lists"}