Reputation:
I am using React to render my page.
I am wondering if it is possible to convert my html
back to jsx
code from browser perspective? Actually I want to clone my project folder from browser.
For example, this is my react code.
import React from 'react';
export function App(props) {
return (
<div className='App'>
<h1>Hello React.</h1>
<h2>Start editing to see some magic happen!</h2>
</div>
);
}
In my browser, I can only see the html file only in inspector.
I tried to check on resource on chrome to see if there is something similar to my react project folder. But there is no exact same things
Is there a way to do this purpose?
----------updated , by using developer tool->source
I have tried to use developer tool to inspect some react js code. But the code is nothing like usual react js code. (I dont know how to call this code below, but it is weird)
Upvotes: 2
Views: 12440
Reputation: 1823
I am not sure what the intentions are (whether debugging or something else), but there are a couple of ways that you could see the React (JSX) code. One would be through the dev tools if you open up the Sources
tab there you can see the whole App structure like so:
Another way is to install the React dev tools plugin for browsers from https://reactjs.org/blog/2015/09/02/new-react-developer-tools.html#installation
Upvotes: 1