React-router warnings
See original GitHub issueFirst off, love this app! Rely on it a lot.
I noticed that when I was using react-router to navigate (Link and history.push) it was throwing me an error of
TypeError: e is not a function
r.define
src/views/DiscoverView.js:38
35 | componentDidMount() {
36 | scripts.concat(Promise.resolve()).reduce((loaded, loading) => {
37 | return loaded.then(script => {
**> 38 | new Function(with (this) {eval(arguments[0])}** | ^ 39 |
).call(window, script);
40 |
41 | return loading;
I managed to fix it by manually going into the appfairy generated view page and adding a “$” in front of it, changing it to “$ {eval(arguments[0])}”, and now it works fine with react-router
Not sure whether its just the way I am using appfairy, or generating the pages, but posting this here just in case other people have the same issue
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top GitHub Comments
Thanks, this worked for me too.
to be fair, the solution provided here seems unreadable. He says and adding a " {eval(arguments[0])}", and now it works fine with react-router I don’t know if since the day he posted git might be parsing some character he wrote there, but I don’t quite understand what Im supposed to do. Can anyone help?