{"id":20852439,"url":"https://github.com/rumax/react-native-saveview","last_synced_at":"2025-05-12T05:30:45.496Z","repository":{"id":55631823,"uuid":"164475374","full_name":"rumax/react-native-SaveView","owner":"rumax","description":"💾 Library for saving React Native View/ScrollView elements","archived":false,"fork":false,"pushed_at":"2020-11-07T21:12:03.000Z","size":26,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T06:58:27.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/rumax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-07T18:42:23.000Z","updated_at":"2024-01-03T19:41:19.000Z","dependencies_parsed_at":"2022-08-15T05:00:33.386Z","dependency_job_id":null,"html_url":"https://github.com/rumax/react-native-SaveView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumax%2Freact-native-SaveView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumax%2Freact-native-SaveView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumax%2Freact-native-SaveView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumax%2Freact-native-SaveView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rumax","download_url":"https://codeload.github.com/rumax/react-native-SaveView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253681876,"owners_count":21946821,"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":[],"created_at":"2024-11-18T03:17:40.948Z","updated_at":"2025-05-12T05:30:44.916Z","avatar_url":"https://github.com/rumax.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# react-native-save-view\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/87b93c7986514ee2829370b17423a6e2)](https://www.codacy.com/app/rumax/react-native-SaveView?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=rumax/react-native-SaveView\u0026amp;utm_campaign=Badge_Grade)\n[![npm](https://img.shields.io/npm/l/express.svg)](https://github.com/rumax/react-native-SaveView)\n[![npm version](https://badge.fury.io/js/react-native-save-view.svg)](https://badge.fury.io/js/react-native-save-view)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\nLibrary for saving React Native View/ScrollView elements\n\n## Example\n\n```js\nexport default class App extends Component {\n  componentDidMount() {\n    this._saveView();\n  }\n\n  render() {\n    return (\n      \u003cView ref={ref =\u003e this._viewRef = ref} collapsable={false}\u003e\n        \u003cText\u003eSome content\u003c/Text\u003e\n      \u003c/View\u003e\n    );\n  }\n\n  async _saveView() {\n    await this._makeSnapshotPNG();\n    await this._makeSnapshotPNGBase64();\n  }\n\n  async _makeSnapshotPNG() {\n    await RNSaveView.saveToPNG(ref, '/sdcard/Download/view.png');\n    // Check /sdcard/Download/view.png using Device File Explorer\n  }\n\n  async _makeSnapshotPNGBase64() {\n    const base64 = await RNSaveView.saveToPNGBase64(ref);\n    console.log('base64:', base64);\n  }\n}\n```\n\n## Methods\nName|Android|iOS|Description|\n----|-------|---|-----------|\nsaveToPNG|✓|✓|Save View to PNG file. Before the function is called, check that android has [write to file permissions](https://developer.android.com/training/data-storage/files)|\nsaveToPNGBase64|✓|✓|Save View to PNG base64|\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\n## Author\n\n- [rumax](https://github.com/rumax)\n\n### Other information\n\n- Generated with [react-native-create-library](https://github.com/frostney/react-native-create-library)\n- Zero JavaScript dependency. Which means that you do not bring other dependencies to your project\n- If you think that something is missing or would like to propose new feature, please, discuss it with author\n- Please, feel free to ⭐️ the project. This gives the confidence that you like it and a great job was done by publishing and supporting it 🤩\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumax%2Freact-native-saveview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frumax%2Freact-native-saveview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumax%2Freact-native-saveview/lists"}