Comments (8)
The reason for this behavior is that LiveReactload tries to reload react-router
twice which -- causing such strange invariant violations.
Unfortunately I haven't found any silver bullet yet, but instead you can use the hack described in #43 gist.
from livereactload.
Thanks for responding.
Yes, I saw the gist and the issue you linked too. What hack are you referring to specifically? Is it line 35 this.context.router.transitionTo('/');
?
from livereactload.
Nope. The hack is to create and run routes inside window.onload
function so that they are not run twice.
This however has a negative side effect: changes to your route definitions are not hot-reloaded.
from livereactload.
I have done more diagnosing and found the issue.
The error I experienced seems to occur whenever I cause a reload while I'm "in a Route." As an example from your gist, if I follow a taco Route and then change some code, I get the above mentioned error (though that particular example will complain about Uncaught TypeError: Cannot read property 'getCurrentParams' of undefined
before it gets to the Invariant Violation). The same behavior occurs if I specify a DefaultRoute.
The window.onload solution does not resolve the error.
from livereactload.
Aah I get it... react-router
is de facto nowadays so maybe I should try to implement a "built-in" for it (like react/addons
)
from livereactload.
+1
from livereactload.
Could you check if this problem is solved in the brand new 2.0.0-alpha2
version? https://github.com/milankinen/livereactload/tree/2.x.x
from livereactload.
Closing this one since there are no new replies since Sep 18.
from livereactload.
Related Issues (20)
- Working with rails HOT 5
- Reload Complete, but no changes in HTML HOT 6
- (notsureif) Question about implementation, or bug. HOT 2
- Examples are broken HOT 2
- Loads two different modules HOT 1
- Source map path/filename issues HOT 4
- Option to disable transform warning HOT 5
- Multi-bundle support HOT 4
- rev=<revision_number> added to hot-reloaded module path results in Chrome not pausing on breakpoints HOT 15
- Add link to up-to-date Redux example HOT 2
- Doesn't detect changes for functions that generate DOM component changes HOT 13
- template literals in npm module HOT 4
- Gulp process does not exit when running tasks. #90 HOT 1
- MdDialog unit test nativeElementnot updated
- Always loading react-hot-loader production AppContainer HOT 3
- Add module.onAnyUpdate hook that triggers every time after reloading event HOT 1
- README "Demo" thumbnail image missing HOT 1
- Support of react-hot-loader v4.0 HOT 2
- livereload when chart components are updated HOT 1
- Does not work with browserify-global-shim HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from livereactload.