Hi, I want to keep the example code(with modifications) as a module. So, can I reference that module with parameters to refer to a store?
Giving an example, say RNStoreUtil is the utility module having all the functions defined by react-native-store (init, destroy, filter, etc etc.,)
And say I need a User Model, a Data Model & a History Model.
Can the init() function be something like-
async init(modelName, testDataSet) {
model = await reactNativeStore.model(modelName);
for(var element in testDataSet) {
await model.add(testDataSet[element]);
}
}
and from my react native module, can I do something like-
Can I do something like this? I tried it, but, I am blocked due to some other issue. So, need some thoughts, so that I can at least finish coding while the other issue is being fixed.
Hi, I want to keep the example code(with modifications) as a module. So, can I reference that module with parameters to refer to a store?
Giving an example, say RNStoreUtil is the utility module having all the functions defined by react-native-store (init, destroy, filter, etc etc.,) And say I need a User Model, a Data Model & a History Model.
Can the init() function be something like-
and from my react native module, can I do something like-
Similarly other functions^ as well..
Can I do something like this? I tried it, but, I am blocked due to some other issue. So, need some thoughts, so that I can at least finish coding while the other issue is being fixed.