electron-react-boilerplate: Store and History undefined in Root.js, even when explicitly passed in.
Line 96 of Router.js:
this.transitionManager = this.createTransitionManager();
all my inputs are defined at runtime I’ve confirmed, and this.createTransitionManager() is also defined.
After passing that line though, this.transitionManager is not defined, and the packaged application fails with:
Uncaught (in promise) TypeError: Cannot read property 'getCurrentLocation' of undefined(…) on line 99 of Router.js
Any ideas on why this might be the case?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (19 by maintainers)
Okay so fixing this issue, here’s the code and how it works:
index.js
In my particular case, in production,
storeandhistoryare undefined, unlessrootis within the same file, and the store and history are not explicitly passed in. This is a workaround for that issue if anyone else runs into it.@amilajack it amazes me you are not even out of school.
I managed to resolve the issue, though I didn’t exactly manage to figure out what the issue was. It was something in my store I think? I’m really not sure unfortunately. Thanks very much for your help.
What is the full stacktrace?