-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot read 'writeToFile' of undefined #6
Comments
Try this: let data = await FileSystem.writeToFile('./productsData', JSON.stringify(productsData.Data)) |
@benwixen |
Hi, I'm not very familiar with sagas or yields, and not entirely sure if the yield-keyword is the issue. Can you use promises?
|
@benwixen BTW where this data is stored physically? I am having data ~15mb |
It's stored on the persistent disk of the device. The exact location depends on operating system, and storage class (the default class is storage.backedUp): https://github.com/benwixen/react-native-filesystem/blob/master/docs/reference.md#filesystemstorage |
Btw, if you're downloading this data, it will be more efficient to use a file download-library. If you first pass the data through the javascript side, it will have to stay in memory until it's written, and then be passed over the React Native bridge (not very performant). |
yield is not the issue. because yields gives you the flexibilities of await. So the issue is something else. |
I'm sorry, but it's hard for me to say exactly what your problem might be. If you can make a minimal project that reproduces the issue, and share it through Github or other means, I will try to pinpoint / fix the issue. |
Package is also imported
import FileSystem from 'react-native-filesystem'
Rebuilt after installng react-native-filesystem. Still no luck! Can somebody help
The text was updated successfully, but these errors were encountered: