Skip to content
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

Closed
ladas-larry opened this issue May 30, 2015 · 6 comments
Closed

[Misc] Debugging React Native in browser #1461

ladas-larry opened this issue May 30, 2015 · 6 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ladas-larry
Copy link

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.

@brentvatne brentvatne changed the title Debugging React Native in browser [Misc] Debugging React Native in browser May 30, 2015
@brentvatne
Copy link
Collaborator

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.

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 npm i facebook/react-native#master --save. You can expect it to become more fully featured over time!

There are already toolkits out there (Cordova/Ionic), where you can run your mobile app directly in the browser and debug it from there.

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.

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.

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!

@brentvatne
Copy link
Collaborator

cc @vjeux

@brentvatne
Copy link
Collaborator

@Dharmoslap - #182

@brentvatne
Copy link
Collaborator

@Dharmoslap - also see #770

@vjeux
Copy link
Contributor

vjeux commented Jun 1, 2015

@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

@brentvatne
Copy link
Collaborator

Consolidating this issue into #182 😄

@facebook facebook locked as resolved and limited conversation to collaborators Jun 1, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants