Commit e80cdb0
committed
Don't dedupe Elements if they're in a non-default Context
If an element gets wrapped in a different server component then that has
a different keyPath context and the element might end up with a different
key.
So we don't use the deduping mechanism if we're already inside a
Server Component parent with a key or otherwise. Only the simple case
gets deduped.
The props of a client element are still deduped though if they're the
same instance.1 parent cdeec64 commit e80cdb0
File tree
3 files changed
+59
-10
lines changed- packages
- react-server-dom-webpack/src/__tests__
- react-server/src
3 files changed
+59
-10
lines changedLines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
228 | 259 | | |
229 | 260 | | |
230 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | 790 | | |
795 | 791 | | |
796 | 792 | | |
| |||
988 | 984 | | |
989 | 985 | | |
990 | 986 | | |
991 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
992 | 998 | | |
993 | 999 | | |
994 | 1000 | | |
| |||
998 | 1004 | | |
999 | 1005 | | |
1000 | 1006 | | |
| 1007 | + | |
1001 | 1008 | | |
1002 | 1009 | | |
1003 | 1010 | | |
| |||
1251 | 1258 | | |
1252 | 1259 | | |
1253 | 1260 | | |
1254 | | - | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
1255 | 1271 | | |
1256 | | - | |
| 1272 | + | |
1257 | 1273 | | |
1258 | 1274 | | |
1259 | 1275 | | |
| |||
1360 | 1376 | | |
1361 | 1377 | | |
1362 | 1378 | | |
1363 | | - | |
| 1379 | + | |
1364 | 1380 | | |
1365 | 1381 | | |
1366 | 1382 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | | - | |
14 | | - | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
0 commit comments