You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/learn/passing-data-deeply-with-context.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -838,7 +838,7 @@ You didn't do anything special for this to work. A `Section` specifies the conte
838
838
839
839
How context works might remind you of [CSS property inheritance.](https://developer.mozilla.org/en-US/docs/Web/CSS/inheritance) In CSS, you can specify `color: blue` for a `<div>`, and any DOM node inside of it, no matter how deep, will inherit that color unless some other DOM node in the middle overrides it with `color: green`. Similarly, in React, the only way to override some context coming from above is to wrap children into a context provider with a different value.
840
840
841
-
In CSS, different properties like `color` and `background-color` don't override each other. You can set all `<div>`'s `color` to red without impacting `background-color`. Similarly, **different React contexts don't override each other.** Each context that you make with `createContext()` is completely separate from other ones, and ties together components using and providing *that particular* context. One component may use or provide many different contexts without a problem.
841
+
In CSS, different properties like `color` and `background-color` don't override each other. You can set all `<div>`'s `color` to red without impacting `background-color`. Similarly, **different React contexts don't override each other.** Each context that you make with `createContext()` is completely separate from other ones, and ties together components using and providing *that particular* context. One component may use or provide many different contexts without a problem.
842
842
843
843
## Before you use context {/*before-you-use-context*/}
844
844
@@ -963,27 +963,27 @@ export const places = [{
963
963
description:'The tradition of choosing bright colors for houses began in the late 20th century.',
964
964
imageId:'K9HVAGH'
965
965
}, {
966
-
id:1,
966
+
id:1,
967
967
name:'Rainbow Village in Taichung, Taiwan',
968
968
description:'To save the houses from demolition, Huang Yung-Fu, a local resident, painted all 1,200 of them in 1924.',
969
969
imageId:'9EAYZrt'
970
970
}, {
971
-
id:2,
971
+
id:2,
972
972
name:'Macromural de Pachuca, Mexico',
973
973
description:'One of the largest murals in the world covering homes in a hillside neighborhood.',
974
974
imageId:'DgXHVwu'
975
975
}, {
976
-
id:3,
976
+
id:3,
977
977
name:'Selarón Staircase in Rio de Janeiro, Brazil',
978
978
description:'This landmark was created by Jorge Selarón, a Chilean-born artist, as a "tribute to the Brazilian people."',
979
979
imageId:'aeO3rpI'
980
980
}, {
981
-
id:4,
981
+
id:4,
982
982
name:'Burano, Italy',
983
983
description:'The houses are painted following a specific color system dating back to 16th century.',
984
984
imageId:'kxsph5C'
985
985
}, {
986
-
id:5,
986
+
id:5,
987
987
name:'Chefchaouen, Marocco',
988
988
description:'There are a few theories on why the houses are painted blue, including that the color repels mosquitos or that it symbolizes sky and heaven.',
989
989
imageId:'rTqKo46'
@@ -1102,27 +1102,27 @@ export const places = [{
1102
1102
description:'The tradition of choosing bright colors for houses began in the late 20th century.',
1103
1103
imageId:'K9HVAGH'
1104
1104
}, {
1105
-
id:1,
1105
+
id:1,
1106
1106
name:'Rainbow Village in Taichung, Taiwan',
1107
1107
description:'To save the houses from demolition, Huang Yung-Fu, a local resident, painted all 1,200 of them in 1924.',
1108
1108
imageId:'9EAYZrt'
1109
1109
}, {
1110
-
id:2,
1110
+
id:2,
1111
1111
name:'Macromural de Pachuca, Mexico',
1112
1112
description:'One of the largest murals in the world covering homes in a hillside neighborhood.',
1113
1113
imageId:'DgXHVwu'
1114
1114
}, {
1115
-
id:3,
1115
+
id:3,
1116
1116
name:'Selarón Staircase in Rio de Janeiro, Brazil',
1117
1117
description:'This landmark was created by Jorge Selarón, a Chilean-born artist, as a "tribute to the Brazilian people".',
1118
1118
imageId:'aeO3rpI'
1119
1119
}, {
1120
-
id:4,
1120
+
id:4,
1121
1121
name:'Burano, Italy',
1122
1122
description:'The houses are painted following a specific color system dating back to 16th century.',
1123
1123
imageId:'kxsph5C'
1124
1124
}, {
1125
-
id:5,
1125
+
id:5,
1126
1126
name:'Chefchaouen, Marocco',
1127
1127
description:'There are a few theories on why the houses are painted blue, including that the color repels mosquitos or that it symbolizes sky and heaven.',
0 commit comments