Skip to content

Commit 7dbd714

Browse files
authored
Merge pull request #31 from oslabs-beta/reactime7
Hover feature on the rendering tab and added gif and flags to the Readme
2 parents 0d8256c + 5818004 commit 7dbd714

11 files changed

+74
-38
lines changed

README.fr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030

3131
<h5 align="center">
3232
<br>
33-
<a href="./README.rus.md">🇷🇺 &nbsp; РУССКАЯ ВЕРСИЯ</a> &nbsp;&nbsp; <a href="./README.fr.md">🇫🇷 &nbsp; VERSION FRANÇAISE</a>
33+
<a href="./README.rus.md">🇷🇺 &nbsp; РУССКАЯ ВЕРСИЯ</a> &nbsp;&nbsp; <a href="./README.md">🇺🇸 &nbsp; ENGLISH VERSION </a>
3434
<br>
3535
</h5>
3636
<br>
3737

3838
<p align="center">
39-
<img src="./assets/reactime7.gif" />
39+
<img src="./assets/new-reactime.gif" />
4040
</p>
4141

4242
<p align="center">

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<br>
1010
</h1>
1111

12-
<h4 align="center"> Reactime is a performance and debugging tool for React developers. It records a snapshot whenever a target application's state is changed and allows the user to jump to any previously recorded state. </h4>
12+
<h4 align="center"> Reactime is a performance and debugging tool for React developers <b>(compatible with Gatsy and Next.js)</b>. It records a snapshot whenever a target application's state is changed and allows the user to jump to any previously recorded state, detect the amount of renders of each component and average time of rendering.</h4>
1313

1414
<br>
1515
<p align="center">
@@ -43,14 +43,14 @@
4343
  <a href="#how-to-use">How To Use</a> • <a href="#features">Features</a> • <a href="https://reactime.io">Website</a> • <a href="#read-more">Read More</a>
4444
</p>
4545

46-
Currently, Reactime supports React apps using stateful components and Hooks, with beta support for Recoil and Context API.
46+
Currently, Reactime supports React apps using stateful components and Hooks, including frameworks like Gatsby and Next.js, with beta support for Recoil and Context API.
4747

4848
<b>Reactime version 7.0</b> beta can help you to avoid unnecessary re-renders. Identifying wasted renders in your React applications is the perfect start to identifying most performance issues.
4949
Reactime 7.0 fixes previous version bugs and incorporates improved visualizations for component relationships. Reactime 7.0 includes expanded [typedoc](https://typedoc.org/api/) documentation for developers looking to contribute to the source code.
5050

5151
After installing Reactime, you can test its functionalities with your React application in development mode.
5252

53-
Please note, the time jumping feature will ONLY work when your application is running in development mode. In production mode, you are able to view your application’s component map but no additional features.
53+
Please note, the time jumping feature will <b>ONLY</b> work when your application is running in <b>development mode</b>. In production mode, you are able to view your application’s component map but no additional features.
5454

5555
## <b>Installation</b>
5656

@@ -88,6 +88,12 @@ Reactime is an open source project, and we’d really appreciate your help with
8888

8989
One of the most common issues that affects performance in React is unnecessary render cycles. This problem can be fixed by checking your renders in the Performance tab in Chrome DevTools under the Reactime panel.
9090

91+
### Gatsby
92+
Reactime offers fully support for Gatsy applications. You would be able to identify unnecessary renders, duration of each rendering, travel-debugging features and visual representation of the tree components.
93+
94+
### Next.js
95+
Reactime offers debugging and performance tools for Next.js apps: time-traveling debugging, preventing unnecessary components re-renders and making your application faster.
96+
9197
### Recording
9298

9399
Whenever state is changed (whenever setState, useState is called), this extension will create a snapshot of the current state tree and record it. Each snapshot will be displayed in Chrome DevTools under the Reactime panel.
@@ -107,6 +113,11 @@ Reactime offers beta support for TypeScript applications using stateful class co
107113
### Documentation
108114

109115
After cloning this repository, developers can simply run `npm run docs` at the root level and serve the dynamically generated `/docs/index.html` file on a browser. Doing so will provide a readable, extensible, and interactive GUI view of the structure and interfaces of the codebase.
116+
<br>
117+
<p align="center">
118+
<img src="./assets/nextjs.gif" />
119+
</p>
120+
<br>
110121

111122
### <b>Additional Features</b>
112123

README.rus.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
<h5 align="center">
1616
<br>
17-
<a href="./README.md">🇷🇺 &nbsp; ENGLISH VERSION </a> &nbsp;&nbsp; <a href="./README.fr.md">🇫🇷 &nbsp; VERSION FRANÇAISE</a>
17+
<a href="./README.md">🇺🇸 &nbsp; ENGLISH VERSION </a> &nbsp;&nbsp; <a href="./README.fr.md">🇫🇷 &nbsp; VERSION FRANÇAISE</a>
1818
<br>
1919
</h5>
2020
<br>
2121

2222
<p align="center">
23-
<img src="./assets/reactime7.gif" />
23+
<img src="./assets/new-reactime.gif" />
2424
</p>
2525

2626
<b>Reactime</b> - расширение для дебаггинга/отладки React приложений. Оно создает снэпшоты при каждом изменении состояния (state) и позволяет пользованию прыгать на любое предыдущее состояние (state). 

archive/.pre-v4-demo 2.gif.icloud

-169 Bytes
Binary file not shown.
-175 Bytes
Binary file not shown.

assets/.reactime-console 2.gif.icloud

-174 Bytes
Binary file not shown.

assets/nextjs.gif

17.6 MB
Loading
-174 Bytes
Binary file not shown.
-174 Bytes
Binary file not shown.
Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,63 @@
11

22
import React from 'react';
3-
3+
import { onHover, onHoverExit } from '../actions/actions';
4+
import { useStoreContext } from '../store'
45

56
const RenderingFrequency = (props) => {
6-
const perfData = props.data
7-
7+
const perfData = props.data
88
return (
9-
<div>
10-
{
11-
Object.keys(perfData).map( componentName => {
12-
const currentComponent = perfData[componentName]
13-
return (
14-
<div className="StyledGridElement">
15-
<div className="RenderLeft">
16-
<h3>{componentName} </h3>
17-
<h4>{currentComponent.stateType}</h4>
18-
<h4>
19-
average time:{' '}
20-
{(
21-
currentComponent.totalRenderTime /
22-
currentComponent.renderFrequency
23-
).toFixed(3)}{' '}
24-
ms
25-
</h4>
26-
</div>
27-
<div className="RenderRight">
28-
<p>{currentComponent.renderFrequency}</p>
29-
</div>
30-
</div>
31-
);
32-
})
33-
}
34-
</div>
35-
)
9+
<div>
10+
{Object.keys(perfData).map(componentName => {
11+
const currentComponent = perfData[componentName];
12+
return (
13+
<ComponentCard
14+
componentName={componentName}
15+
stateType={currentComponent.stateType}
16+
averageRenderTime={(
17+
currentComponent.totalRenderTime /
18+
currentComponent.renderFrequency
19+
).toFixed(3)}
20+
renderFrequency={currentComponent.renderFrequency}
21+
rtid={currentComponent.rtid}
22+
/>
23+
)}
24+
)
25+
}
26+
</div>
27+
)
3628
}
3729

30+
const ComponentCard = props => {
31+
const { componentName, stateType, averageRenderTime, renderFrequency, rtid} = props;
32+
const [{ tabs, currentTab }, dispatch] = useStoreContext();
33+
34+
const onMouseMove = () => {
35+
dispatch(onHover(rtid))
36+
}
37+
const onMouseLeave = () => {
38+
dispatch(onHoverExit(rtid))
39+
}
40+
41+
return (
42+
<div
43+
onMouseLeave={onMouseLeave}
44+
onMouseMove={onMouseMove}
45+
className="StyledGridElement">
46+
<div className="RenderLeft">
47+
<h3>{componentName} </h3>
48+
<h4>{stateType}</h4>
49+
<h4>
50+
average time:{' '}
51+
{averageRenderTime}{' '}
52+
ms
53+
</h4>
54+
</div>
55+
<div className="RenderRight">
56+
<p>{renderFrequency}</p>
57+
</div>
58+
</div>
59+
);
60+
}
61+
62+
3863
export default RenderingFrequency;

0 commit comments

Comments
 (0)