user15608655
user15608655

Reputation:

How to clone react project via browser

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.

enter image description here

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?

enter image description here

----------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)

enter image description here

Upvotes: 2

Views: 12440

Answers (1)

N. Ivanov
N. Ivanov

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: enter image description here

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

Related Questions