-
Notifications
You must be signed in to change notification settings - Fork 47.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import React Concurrent Mode Profiler (#19634)
Co-authored-by: Brian Vaughn <[email protected]> Co-authored-by: Kartik Choudhary <[email protected]>
- Loading branch information
1 parent
c641b61
commit 2bea3fb
Showing
58 changed files
with
8,946 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Experimental React Concurrent Mode Profiler | ||
|
||
- Deployed at: https://react-scheduling-profiler.vercel.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"private": true, | ||
"name": "react-devtools-scheduling-profiler", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "cross-env NODE_ENV=production cross-env TARGET=remote webpack --config webpack.config.js", | ||
"start": "cross-env NODE_ENV=development cross-env TARGET=local webpack-dev-server --open" | ||
}, | ||
"dependencies": { | ||
"@elg/speedscope": "1.9.0-a6f84db", | ||
"clipboard-js": "^0.3.6", | ||
"memoize-one": "^5.1.1", | ||
"nullthrows": "^1.1.1", | ||
"pretty-ms": "^7.0.0", | ||
"react-virtualized-auto-sizer": "^1.0.2", | ||
"regenerator-runtime": "^0.13.7" | ||
}, | ||
"devDependencies": { | ||
"babel-loader": "^8.1.0", | ||
"css-loader": "^4.2.1", | ||
"file-loader": "^6.0.0", | ||
"html-webpack-plugin": "^4.3.0", | ||
"style-loader": "^1.2.1", | ||
"url-loader": "^4.1.0", | ||
"webpack": "^4.44.1", | ||
"webpack-cli": "^3.3.12", | ||
"webpack-dev-server": "^3.11.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
*/ | ||
|
||
import type {ReactProfilerData} from './types'; | ||
|
||
import * as React from 'react'; | ||
import {useState} from 'react'; | ||
|
||
import ImportPage from './ImportPage'; | ||
import CanvasPage from './CanvasPage'; | ||
|
||
export default function App() { | ||
const [profilerData, setProfilerData] = useState<ReactProfilerData | null>( | ||
null, | ||
); | ||
|
||
if (profilerData) { | ||
return <CanvasPage profilerData={profilerData} />; | ||
} else { | ||
return <ImportPage onDataImported={setProfilerData} />; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/react-devtools-scheduling-profiler/src/CanvasPage.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.CanvasPage { | ||
position: absolute; | ||
top: 0.5rem; | ||
bottom: 0.5rem; | ||
left: 0.5rem; | ||
right: 0.5rem; | ||
} |
Oops, something went wrong.