https://github.com/kormanowsky/expo-use-file
https://github.com/kormanowsky/expo-use-file
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kormanowsky/expo-use-file
- Owner: kormanowsky
- Created: 2020-10-27T23:02:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-06T22:13:24.000Z (almost 6 years ago)
- Last Synced: 2025-03-22T22:42:44.474Z (over 1 year ago)
- Language: JavaScript
- Size: 163 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# expo-use-file
## A collection of hooks to use for file syncing in expo apps.
1. `useFile(fileName)`
Returns three values:
`[value, loadFromFile, writeToFile]`
Use `loadFromFile` to force load value from file. Use `writeToFile` to write new value to the file.
2. `useJSONFile(fileName)`
It's the same as `useFile()` but handles JSON conversion by itself and returns object in `value`
# Version History
- v1.0.0 - Initial Release
- v1.1.0 - Fix bug when working with several files
- v1.1.1 - Bugfix
- v1.1.2 - Bugfix
- v1.1.3 - Bugfix