3 ms·
Is this the same program that, if a project has installed, tries to make a bunch of websocket requests from the app to the browser plugin, which if non-existent
by komali2 7y ago
Is this the same program that, if a project has installed, tries to make a bunch of websocket requests from the app to the browser plugin, which if non-existent causes your console and network tab to be flooded with failed websocket requests?
- brianvaughn 7y agoDoesn't sound like it. React DevTools uses the `postMessage` API to communicate, not websockets.
- LinguaBrowse 7y agokomali2 is referring to the long-standing issue in the React Native repo (#10027); see my comment for an explanation: https://news.ycombinator.com/item?id=20713612 https://news.ycombinator.com/item?id=20713612 Maybe the Chrome/Firefox DevTools don't, but the standalone React DevTools most definitely depend on WebSockets. My custom React renderer can't connect to them without shimming in a WebSockets implementation, for example.
- brianvaughn 7y agoThank you for elaborating.
- leetrout 7y agoAre you thinking of the service worker caching issues in create-react-app?
- ricardobeat 7y agoHot reload?
- pault 7y agoNo, that's the webpack dev server.
- LinguaBrowse 7y agoI'm surprised that everyone's looking confused here. Yes: since 2016 (React Native v0.32), at least on iOS, React Native apps in development mode try to open WebSocket connections to standalone React DevTools at startup and indeed flood your console with cryptic messages. https://github.com/facebook/react-native/issues/10027 https://github.com/facebook/react-native/issues/10027 The issue has been locked and is still open.
- danabramov 7y agoThanks for explaining. This is the first time I’m hearing about this issue. I’ll pass it to the team so it can get fixed.
- LinguaBrowse 7y agoThanks, Dan! The incessant console-flooding was actually one of the things that made me give up on React Native. Great to hear that this is being addressed.
- danabramov 7y ago>The incessant console-flooding was actually one of the things that made me give up on React Native. Doesn't this particular issue include a workaround?
- komali2 7y ago> But unfortunate it's not enough. Especially because other websocket created in RCTPackagerConnection (funcition socketForLocation) and as I can see it can't be disabled from AppDelegate :-(