Skip to content

Commit 92b2efa

Browse files
committed
chore: Testing page re-renders when loading redux data from deeply-nested components
1 parent 649ca2d commit 92b2efa

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

client/src/common/ui/card/Card.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.card {
22
border: 1px solid;
3-
max-width: 400px;
3+
min-width: 400px;
4+
max-width: 600px;
45
min-height: 100px;
56
border-radius: 16px;
67
padding: 16px;

client/src/components/redux/index.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,30 @@ function ReduxComponent ({
1313
Redux Toolkit
1414
</h2>
1515

16+
<p>Testing rendering data from a redux store inside a deeply-nested component.</p>
17+
1618
<button onClick={addTodo}
1719
style={{ marginTop: '24px' }}>
1820
Add Todo
1921
</button>
2022

21-
<TodoListComponent deleteTodo={deleteTodo} />
23+
<br /><br />
24+
25+
{/** A deeply-nested component */}
26+
<Card>
27+
<Card>
28+
<Card>
29+
<Card>
30+
<Card>
31+
<Card>
32+
<TodoListComponent deleteTodo={deleteTodo} />
33+
</Card>
34+
</Card>
35+
</Card>
36+
</Card>
37+
</Card>
38+
</Card>
39+
2240
<br />
2341

2442
<Card>

0 commit comments

Comments
 (0)