-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Misc] Debugging React Native in browser #1461
Comments
I would argue that is not the good thing but one of the good things about it. You get many benefits of using CSS-like styles in React Native 😄 - such as familiar syntax, Flexbox layout, etc. Additionally, inspecting CSS should be much less of an issue in React Native where you must use inline styles, because you don't have to worry about the cascade - so you should just be able to look at your component file and see the styles right there. That said, inspecting elements is certainly useful and efforts are underway to add an element inspector to React Native. You can try it right now by installing from master
This works fantastic for them, and the reason is that the only context the app ever runs in is inside of a browser, so whether that's a WebView on an iPhone in Chrome, it's the same thing. React Native does not run inside of a WebView - you are interacting with real native UI components.
As far as I know, this is not on the roadmap. You're more than welcome to investigate yourself and try to make this work! |
cc @vjeux |
@Dharmoslap - #182 |
@Dharmoslap - also see #770 |
@brentvatne: can you consolidate all those issues into one that's about implementing core components on web? Not going to happen anytime soon but should be tracked somewhere |
Consolidating this issue into #182 😄 |
The good thing about front-end web technologies is that there are a lots of people who know how to quickly debug them just in the browser using DOM inspector. What is the point about making mobile application with CSS, if I can't use the benefit of DOM inspector? Alright, I can just follow the docs + common sense and hope that everything will always just work, but there will be for sure situations where inspecting CSS might be really helpful. There are already toolkits out there (Cordova/Ionic), where you can run your mobile app directly in the browser and debug it from there.
So we need to be able to open React Native app in the browser, develop it from there, and then run it in xCode. That would probably mean to incorporate React.js components to substitute React Native component's inside browser, using some CSS/JavaScript similar to what http://touchstonejs.io/ or http://www.idangero.us/framework7/ are making.
The text was updated successfully, but these errors were encountered: