@datacomvn/file-opener
Version:
React Native file opener of Datacom Vietnam
36 lines (23 loc) • 743 B
Markdown
React Native file opener của Datacom Vietnam
```sh
yarn add @datacomvn/file-opener react-native-nitro-modules
> `react-native-nitro-modules` là bắt buộc vì thư viện này phụ thuộc vào [Nitro Modules](https://nitro.margelo.com/).
```
```js
import { FileOpener } from '@datacomvn/file-opener';
// Mở file với đường dẫn cụ thể
const success = FileOpener.open('/path/to/your/file.pdf');
// Kiểm tra kết quả
if (success) {
console.log('File đã được mở thành công');
} else {
console.error('Không thể mở file');
}
```
MIT
---
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)