Hi, I tried asking for help on stackoverflow but couldn’t get any helpful answers. I hope I get some help here.
- Seperate firebase onAuthStateChange (ex:
module1) and localforage creation logic(Ex:
module2) in two different modules, import both in parent file.
- Write a method which takes userEmail as argument and retuns localforage instance in
module2and export that method(ex:
- Generate a custom event and emit it from onAuthStateChange and listen to it in parent file and from there call
If handling async code is the only issue than above approach should work.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.