@fluentui/react-context-selector 0.0.0-nightly0025eeb82020211108.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,450 @@
1
+ # Change Log - @fluentui/react-context-selector
2
+
3
+ This log was last generated on Mon, 08 Nov 2021 04:16:56 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [0.0.0-nightly0025eeb82020211108.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.0.0-nightly0025eeb82020211108.1)
8
+
9
+ Mon, 08 Nov 2021 04:16:56 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-beta.2..@fluentui/react-context-selector_v0.0.0-nightly0025eeb82020211108.1)
11
+
12
+ ### Changes
13
+
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/e827ff6b79e47c8702651bbdc55176c0f505f4e9) by email not defined)
15
+ - Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
16
+ - Bump @fluentui/react-utilities to v0.0.0-nightly0025eeb82020211108.1 ([commit](https://github.com/microsoft/fluentui/commit/e827ff6b79e47c8702651bbdc55176c0f505f4e9) by beachball)
17
+
18
+ ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-beta.2)
19
+
20
+ Wed, 27 Oct 2021 12:14:24 GMT
21
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-beta.1..@fluentui/react-context-selector_v9.0.0-beta.2)
22
+
23
+ ### Changes
24
+
25
+ - Bump @fluentui/react-utilities to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
26
+
27
+ ## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-beta.1)
28
+
29
+ Wed, 06 Oct 2021 10:37:22 GMT
30
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.39..@fluentui/react-context-selector_v9.0.0-beta.1)
31
+
32
+ ### Changes
33
+
34
+ - Bump all v9 components to beta prerelease tag ([PR #20106](https://github.com/microsoft/fluentui/pull/20106) by lingfangao@hotmail.com)
35
+ - Bump @fluentui/react-utilities to v9.0.0-beta.1 ([PR #20106](https://github.com/microsoft/fluentui/pull/20106) by beachball)
36
+
37
+ ## [9.0.0-alpha.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.39)
38
+
39
+ Tue, 05 Oct 2021 09:28:07 GMT
40
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.38..@fluentui/react-context-selector_v9.0.0-alpha.39)
41
+
42
+ ### Changes
43
+
44
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.56 ([PR #20081](https://github.com/microsoft/fluentui/pull/20081) by beachball)
45
+
46
+ ## [9.0.0-alpha.38](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.38)
47
+
48
+ Fri, 01 Oct 2021 14:13:08 GMT
49
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.36..@fluentui/react-context-selector_v9.0.0-alpha.38)
50
+
51
+ ### Changes
52
+
53
+ - Bump v9 prerelease versions to rerelease ([PR #20069](https://github.com/microsoft/fluentui/pull/20069) by lingfangao@hotmail.com)
54
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.55 ([PR #20069](https://github.com/microsoft/fluentui/pull/20069) by beachball)
55
+
56
+ ## [9.0.0-alpha.36](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.36)
57
+
58
+ Mon, 27 Sep 2021 08:06:00 GMT
59
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.35..@fluentui/react-context-selector_v9.0.0-alpha.36)
60
+
61
+ ### Changes
62
+
63
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.53 ([PR #19981](https://github.com/microsoft/fluentui/pull/19981) by beachball)
64
+
65
+ ## [9.0.0-alpha.35](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.35)
66
+
67
+ Fri, 24 Sep 2021 09:17:17 GMT
68
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.34..@fluentui/react-context-selector_v9.0.0-alpha.35)
69
+
70
+ ### Changes
71
+
72
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.52 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball)
73
+
74
+ ## [9.0.0-alpha.34](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.34)
75
+
76
+ Thu, 23 Sep 2021 08:21:34 GMT
77
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.33..@fluentui/react-context-selector_v9.0.0-alpha.34)
78
+
79
+ ### Changes
80
+
81
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.51 ([commit](https://github.com/microsoft/fluentui/commit/95682da34c48813f7658032ae490d21d2f363b90) by beachball)
82
+
83
+ ## [9.0.0-alpha.33](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.33)
84
+
85
+ Wed, 22 Sep 2021 10:10:07 GMT
86
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.32..@fluentui/react-context-selector_v9.0.0-alpha.33)
87
+
88
+ ### Changes
89
+
90
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.50 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
91
+
92
+ ## [9.0.0-alpha.32](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.32)
93
+
94
+ Fri, 17 Sep 2021 07:35:26 GMT
95
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.31..@fluentui/react-context-selector_v9.0.0-alpha.32)
96
+
97
+ ### Changes
98
+
99
+ - Bump @fluentui/react-context-selector to v9.0.0-alpha.32 ([PR #19840](https://github.com/microsoft/fluentui/pull/19840) by Humberto.Morimoto@microsoft.com)
100
+
101
+ ## [9.0.0-alpha.31](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.31)
102
+
103
+ Thu, 16 Sep 2021 07:38:39 GMT
104
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.30..@fluentui/react-context-selector_v9.0.0-alpha.31)
105
+
106
+ ### Changes
107
+
108
+ - Bump @fluentui/react-context-selector to v9.0.0-alpha.31 ([PR #19815](https://github.com/microsoft/fluentui/pull/19815) by behowell@microsoft.com)
109
+
110
+ ## [9.0.0-alpha.30](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.30)
111
+
112
+ Tue, 14 Sep 2021 20:09:02 GMT
113
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.29..@fluentui/react-context-selector_v9.0.0-alpha.30)
114
+
115
+ ### Changes
116
+
117
+ - Bump @fluentui/react-context-selector to v9.0.0-alpha.30 ([PR #19155](https://github.com/microsoft/fluentui/pull/19155) by bsunderhus@microsoft.com)
118
+
119
+ ## [9.0.0-alpha.29](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.29)
120
+
121
+ Fri, 10 Sep 2021 16:31:53 GMT
122
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.28..@fluentui/react-context-selector_v9.0.0-alpha.29)
123
+
124
+ ### Changes
125
+
126
+ - chore(v9): Move all internal v9 dependencies from caret to fixed version ([PR #19748](https://github.com/microsoft/fluentui/pull/19748) by lingfangao@hotmail.com)
127
+ - Bump @fluentui/react-context-selector to v9.0.0-alpha.29 ([PR #19748](https://github.com/microsoft/fluentui/pull/19748) by lingfangao@hotmail.com)
128
+
129
+ ## [9.0.0-alpha.28](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.28)
130
+
131
+ Fri, 10 Sep 2021 07:39:51 GMT
132
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.27..@fluentui/react-context-selector_v9.0.0-alpha.28)
133
+
134
+ ### Changes
135
+
136
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.45 ([PR #19642](https://github.com/microsoft/fluentui/pull/19642) by behowell@microsoft.com)
137
+
138
+ ## [9.0.0-alpha.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.27)
139
+
140
+ Mon, 06 Sep 2021 07:34:53 GMT
141
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.26..@fluentui/react-context-selector_v9.0.0-alpha.27)
142
+
143
+ ### Changes
144
+
145
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.44 ([PR #19640](https://github.com/microsoft/fluentui/pull/19640) by lingfangao@hotmail.com)
146
+
147
+ ## [9.0.0-alpha.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.26)
148
+
149
+ Wed, 01 Sep 2021 07:39:56 GMT
150
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.25..@fluentui/react-context-selector_v9.0.0-alpha.26)
151
+
152
+ ### Changes
153
+
154
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.43 ([PR #19483](https://github.com/microsoft/fluentui/pull/19483) by bsunderhus@microsoft.com)
155
+
156
+ ## [9.0.0-alpha.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.25)
157
+
158
+ Tue, 31 Aug 2021 07:37:47 GMT
159
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.24..@fluentui/react-context-selector_v9.0.0-alpha.25)
160
+
161
+ ### Changes
162
+
163
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.42 ([PR #19556](https://github.com/microsoft/fluentui/pull/19556) by lingfan.gao@microsoft.com)
164
+
165
+ ## [9.0.0-alpha.24](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.24)
166
+
167
+ Fri, 20 Aug 2021 07:37:28 GMT
168
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.23..@fluentui/react-context-selector_v9.0.0-alpha.24)
169
+
170
+ ### Changes
171
+
172
+ - Update .npmignore ([PR #19441](https://github.com/microsoft/fluentui/pull/19441) by elcraig@microsoft.com)
173
+
174
+ ## [9.0.0-alpha.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.23)
175
+
176
+ Thu, 19 Aug 2021 07:41:35 GMT
177
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.22..@fluentui/react-context-selector_v9.0.0-alpha.23)
178
+
179
+ ### Changes
180
+
181
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.39 ([PR #19273](https://github.com/microsoft/fluentui/pull/19273) by bsunderhus@microsoft.com)
182
+
183
+ ## [9.0.0-alpha.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.22)
184
+
185
+ Fri, 06 Aug 2021 07:35:14 GMT
186
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.21..@fluentui/react-context-selector_v9.0.0-alpha.22)
187
+
188
+ ### Changes
189
+
190
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.38 ([PR #19189](https://github.com/microsoft/fluentui/pull/19189) by bsunderhus@microsoft.com)
191
+
192
+ ## [9.0.0-alpha.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.21)
193
+
194
+ Tue, 03 Aug 2021 07:39:30 GMT
195
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.20..@fluentui/react-context-selector_v9.0.0-alpha.21)
196
+
197
+ ### Patches
198
+
199
+ - Bump @fluentui/eslint-plugin to v1.3.3 ([PR #19169](https://github.com/microsoft/fluentui/pull/19169) by behowell@microsoft.com)
200
+ - Bump @fluentui/scripts to v1.0.0 ([PR #19169](https://github.com/microsoft/fluentui/pull/19169) by behowell@microsoft.com)
201
+
202
+ ### Changes
203
+
204
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.37 ([PR #19169](https://github.com/microsoft/fluentui/pull/19169) by behowell@microsoft.com)
205
+
206
+ ## [9.0.0-alpha.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.20)
207
+
208
+ Mon, 02 Aug 2021 07:36:20 GMT
209
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.19..@fluentui/react-context-selector_v9.0.0-alpha.20)
210
+
211
+ ### Changes
212
+
213
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.36 ([PR #19204](https://github.com/microsoft/fluentui/pull/19204) by lingfan.gao@microsoft.com)
214
+
215
+ ## [9.0.0-alpha.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.19)
216
+
217
+ Fri, 23 Jul 2021 07:38:19 GMT
218
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.18..@fluentui/react-context-selector_v9.0.0-alpha.19)
219
+
220
+ ### Changes
221
+
222
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.35 ([PR #18610](https://github.com/microsoft/fluentui/pull/18610) by behowell@microsoft.com)
223
+
224
+ ## [9.0.0-alpha.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.18)
225
+
226
+ Thu, 22 Jul 2021 07:36:55 GMT
227
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.17..@fluentui/react-context-selector_v9.0.0-alpha.18)
228
+
229
+ ### Changes
230
+
231
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.34 ([PR #19023](https://github.com/microsoft/fluentui/pull/19023) by behowell@microsoft.com)
232
+
233
+ ## [9.0.0-alpha.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.17)
234
+
235
+ Thu, 15 Jul 2021 07:36:18 GMT
236
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.16..@fluentui/react-context-selector_v9.0.0-alpha.17)
237
+
238
+ ### Changes
239
+
240
+ - feat(useHasParentContext): new hook to determine if a context provider exists as parent ([PR #18812](https://github.com/microsoft/fluentui/pull/18812) by lingfan.gao@microsoft.com)
241
+
242
+ ## [9.0.0-alpha.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.16)
243
+
244
+ Fri, 09 Jul 2021 07:39:31 GMT
245
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.15..@fluentui/react-context-selector_v9.0.0-alpha.16)
246
+
247
+ ### Patches
248
+
249
+ - Bump @fluentui/eslint-plugin to v1.3.2 ([PR #18808](https://github.com/microsoft/fluentui/pull/18808) by martinhochel@microsoft.com)
250
+ - Bump @fluentui/scripts to v1.0.0 ([PR #18808](https://github.com/microsoft/fluentui/pull/18808) by martinhochel@microsoft.com)
251
+
252
+ ### Changes
253
+
254
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.32 ([PR #18808](https://github.com/microsoft/fluentui/pull/18808) by martinhochel@microsoft.com)
255
+
256
+ ## [9.0.0-alpha.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.15)
257
+
258
+ Fri, 02 Jul 2021 23:15:55 GMT
259
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.14..@fluentui/react-context-selector_v9.0.0-alpha.15)
260
+
261
+ ### Changes
262
+
263
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.31 ([PR #18721](https://github.com/microsoft/fluentui/pull/18721) by bsunderhus@microsoft.com)
264
+
265
+ ## [9.0.0-alpha.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.14)
266
+
267
+ Fri, 02 Jul 2021 07:37:06 GMT
268
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.13..@fluentui/react-context-selector_v9.0.0-alpha.14)
269
+
270
+ ### Changes
271
+
272
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.30 ([PR #18796](https://github.com/microsoft/fluentui/pull/18796) by bsunderhus@microsoft.com)
273
+
274
+ ## [9.0.0-alpha.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.13)
275
+
276
+ Tue, 15 Jun 2021 07:40:20 GMT
277
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.12..@fluentui/react-context-selector_v9.0.0-alpha.13)
278
+
279
+ ### Changes
280
+
281
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.29 ([PR #18521](https://github.com/microsoft/fluentui/pull/18521) by behowell@microsoft.com)
282
+
283
+ ## [9.0.0-alpha.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.12)
284
+
285
+ Mon, 07 Jun 2021 07:38:15 GMT
286
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.11..@fluentui/react-context-selector_v9.0.0-alpha.12)
287
+
288
+ ### Patches
289
+
290
+ - Bump @fluentui/eslint-plugin to v1.3.1 ([PR #18437](https://github.com/microsoft/fluentui/pull/18437) by martinhochel@microsoft.com)
291
+ - Bump @fluentui/scripts to v1.0.0 ([PR #18437](https://github.com/microsoft/fluentui/pull/18437) by martinhochel@microsoft.com)
292
+
293
+ ### Changes
294
+
295
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.28 ([PR #18437](https://github.com/microsoft/fluentui/pull/18437) by martinhochel@microsoft.com)
296
+
297
+ ## [9.0.0-alpha.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.11)
298
+
299
+ Fri, 04 Jun 2021 07:37:23 GMT
300
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.10..@fluentui/react-context-selector_v9.0.0-alpha.11)
301
+
302
+ ### Changes
303
+
304
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.27 ([PR #18168](https://github.com/microsoft/fluentui/pull/18168) by Humberto.Morimoto@microsoft.com)
305
+
306
+ ## [9.0.0-alpha.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.10)
307
+
308
+ Wed, 26 May 2021 07:35:43 GMT
309
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.9..@fluentui/react-context-selector_v9.0.0-alpha.10)
310
+
311
+ ### Changes
312
+
313
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.25 ([PR #18323](https://github.com/microsoft/fluentui/pull/18323) by lingfan.gao@microsoft.com)
314
+
315
+ ## [9.0.0-alpha.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.9)
316
+
317
+ Fri, 21 May 2021 07:34:54 GMT
318
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.8..@fluentui/react-context-selector_v9.0.0-alpha.9)
319
+
320
+ ### Changes
321
+
322
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.24 ([PR #18259](https://github.com/microsoft/fluentui/pull/18259) by behowell@microsoft.com)
323
+
324
+ ## [9.0.0-alpha.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.8)
325
+
326
+ Thu, 20 May 2021 07:41:54 GMT
327
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.7..@fluentui/react-context-selector_v9.0.0-alpha.8)
328
+
329
+ ### Patches
330
+
331
+ - Bump @fluentui/eslint-plugin to v1.3.0 ([PR #18024](https://github.com/microsoft/fluentui/pull/18024) by elcraig@microsoft.com)
332
+ - Bump @fluentui/scripts to v1.0.0 ([PR #18024](https://github.com/microsoft/fluentui/pull/18024) by elcraig@microsoft.com)
333
+
334
+ ### Changes
335
+
336
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.23 ([PR #18024](https://github.com/microsoft/fluentui/pull/18024) by elcraig@microsoft.com)
337
+
338
+ ## [9.0.0-alpha.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.7)
339
+
340
+ Wed, 19 May 2021 07:34:20 GMT
341
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.6..@fluentui/react-context-selector_v9.0.0-alpha.7)
342
+
343
+ ### Changes
344
+
345
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.22 ([PR #18037](https://github.com/microsoft/fluentui/pull/18037) by olfedias@microsoft.com)
346
+
347
+ ## [9.0.0-alpha.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.6)
348
+
349
+ Mon, 03 May 2021 07:45:19 GMT
350
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.5..@fluentui/react-context-selector_v9.0.0-alpha.6)
351
+
352
+ ### Changes
353
+
354
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.21 ([PR #18005](https://github.com/microsoft/fluentui/pull/18005) by lingfan.gao@microsoft.com)
355
+
356
+ ## [9.0.0-alpha.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.5)
357
+
358
+ Fri, 30 Apr 2021 07:42:23 GMT
359
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.4..@fluentui/react-context-selector_v9.0.0-alpha.5)
360
+
361
+ ### Patches
362
+
363
+ - Bump @fluentui/eslint-plugin to v1.2.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
364
+ - Bump @fluentui/scripts to v1.0.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
365
+
366
+ ### Changes
367
+
368
+ - Upgrade to TS 4.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
369
+
370
+ ## [9.0.0-alpha.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.4)
371
+
372
+ Fri, 23 Apr 2021 07:37:10 GMT
373
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.3..@fluentui/react-context-selector_v9.0.0-alpha.4)
374
+
375
+ ### Patches
376
+
377
+ - Bump @fluentui/eslint-plugin to v1.1.1 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
378
+ - Bump @fluentui/scripts to v1.0.0 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
379
+
380
+ ### Changes
381
+
382
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.19 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
383
+
384
+ ## [9.0.0-alpha.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.3)
385
+
386
+ Thu, 22 Apr 2021 07:33:28 GMT
387
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.2..@fluentui/react-context-selector_v9.0.0-alpha.3)
388
+
389
+ ### Changes
390
+
391
+ - use useIsomorphicEffect from @fluentui/react-utilities ([PR #17897](https://github.com/microsoft/fluentui/pull/17897) by olfedias@microsoft.com)
392
+
393
+ ## [9.0.0-alpha.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.2)
394
+
395
+ Wed, 31 Mar 2021 00:53:43 GMT
396
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.1..@fluentui/react-context-selector_v9.0.0-alpha.2)
397
+
398
+ ### Patches
399
+
400
+ - Bump @fluentui/eslint-plugin to v1.1.0 ([PR #17568](https://github.com/microsoft/fluentui/pull/17568) by elcraig@microsoft.com)
401
+ - Bump @fluentui/scripts to v1.0.0 ([PR #17568](https://github.com/microsoft/fluentui/pull/17568) by elcraig@microsoft.com)
402
+
403
+ ## [9.0.0-alpha.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.1)
404
+
405
+ Tue, 30 Mar 2021 07:34:45 GMT
406
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.4..@fluentui/react-context-selector_v9.0.0-alpha.1)
407
+
408
+ ### Changes
409
+
410
+ - Bump react-context-selector to v9 ([PR #17350](https://github.com/microsoft/fluentui/pull/17350) by lingfan.gao@microsoft.com)
411
+ - chore: restore "sideEffects" to enable treeshaking ([PR #17584](https://github.com/microsoft/fluentui/pull/17584) by olfedias@microsoft.com)
412
+
413
+ ## [0.53.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.4)
414
+
415
+ Mon, 15 Mar 2021 07:36:20 GMT
416
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.3..@fluentui/react-context-selector_v0.53.4)
417
+
418
+ ### Patches
419
+
420
+ - Remove set-version references ([PR #17381](https://github.com/microsoft/fluentui/pull/17381) by elcraig@microsoft.com)
421
+
422
+ ## [0.53.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.3)
423
+
424
+ Fri, 26 Feb 2021 01:16:27 GMT
425
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.2..@fluentui/react-context-selector_v0.53.3)
426
+
427
+ ### Patches
428
+
429
+ - update references to major-bumped packages ([PR #17169](https://github.com/microsoft/fluentui/pull/17169) by elcraig@microsoft.com)
430
+
431
+ ## [0.53.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.2)
432
+
433
+ Mon, 22 Feb 2021 12:26:22 GMT
434
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.0..@fluentui/react-context-selector_v0.53.2)
435
+
436
+ ### Patches
437
+
438
+ - Manually bump react-context-selector ([PR #17084](https://github.com/microsoft/fluentui/pull/17084) by elcraig@microsoft.com)
439
+
440
+ ## [0.53.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.0)
441
+
442
+ Thu, 18 Feb 2021 19:38:50 GMT
443
+
444
+ ### Minor changes
445
+
446
+ - Remove useContextSelectors to align with proposed React implementation ([PR #17049](https://github.com/microsoft/fluentui/pull/17049) by lingfan.gao@microsoft.com)
447
+
448
+ ### Patches
449
+
450
+ - chore: fix version mismatch ([PR #17053](https://github.com/microsoft/fluentui/pull/17053) by olfedias@microsoft.com)
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ @fluentui/react-context-selector
2
+
3
+ Copyright (c) Microsoft Corporation
4
+
5
+ All rights reserved.
6
+
7
+ MIT License
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+
15
+ Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
package/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # `@fluentui/react-context-selector`
2
+
3
+ React `useContextSelector()` and `useContextSelectors()` hooks in userland.
4
+
5
+ ## Introduction
6
+
7
+ [React Context](https://reactjs.org/docs/context.html) and [`useContext()`](https://reactjs.org/docs/hooks-reference.html#usecontext) is often used to avoid prop drilling,
8
+ however it's known that there's a performance issue. When a context value is changed, all components that are subscribed with `useContext()` will re-render.
9
+
10
+ [useContextSelector](https://github.com/reactjs/rfcs/pull/119) is recently proposed. While waiting for the process, this library provides the API in userland.
11
+
12
+ # Installation
13
+
14
+ **NPM**
15
+
16
+ ```bash
17
+ npm install --save @fluentui/react-context-selector
18
+ ```
19
+
20
+ **Yarn**
21
+
22
+ ```bash
23
+ yarn add @fluentui/react-context-selector
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ ### Getting started
29
+
30
+ ```tsx
31
+ import * as React from 'react';
32
+ import { createContext, useContextSelector, ContextSelector } from '@fluentui/react-context-selector';
33
+
34
+ interface CounterContextValue {
35
+ count1: number;
36
+ count2: number;
37
+ incrementCount1: () => void;
38
+ incrementCount2: () => void;
39
+ }
40
+
41
+ // 💡 The same syntax as native React context API
42
+ // https://reactjs.org/docs/context.html#reactcreatecontext
43
+ const CounterContext = createContext<CounterContextValue>({});
44
+
45
+ const CounterProvider = CounterContext.Provider;
46
+
47
+ // not necessary but can be a good layer to mock for unit testing
48
+ const useCounterContext = <T>(selector: ContextSelector<CounterCountext, T>) =>
49
+ useContextSelector(CounterContext, selector);
50
+
51
+ const Counter1 = () => {
52
+ // 💡 Context updates will be propagated only when result of a selector function will change
53
+ // "Object.is()" is used for internal comparisons
54
+ const count1 = useCounterContext(context => context.count1);
55
+ const increment = useCounterContext(context => context.incrementCount1);
56
+
57
+ return <button onClick={increment}>Counter 1: {count1}</button>;
58
+ };
59
+
60
+ const Counter2 = () => {
61
+ const count1 = useCounterContext(context => context.count2);
62
+ const increment = useCounterContext(context => context.incrementCount2);
63
+
64
+ return <button onClick={increment}>Counter 1: {count1}</button>;
65
+ };
66
+
67
+ export default function App() {
68
+ const [state, setState] = React.useState({ count1: 0, count2: 0 });
69
+
70
+ const incrementCount1 = React.useCallback(() => setState(s => ({ ...s, count1: s.count1 + 1 })), [setState]);
71
+ const incrementCount2 = React.useCallback(() => setState(s => ({ ...s, count2: s.count2 + 1 })), [setState]);
72
+
73
+ return (
74
+ <div className="App">
75
+ <CounterProvider
76
+ value={{
77
+ count1: state.count1,
78
+ count2: state.count2,
79
+ incrementCount1,
80
+ incrementCount2,
81
+ }}
82
+ >
83
+ <Counter1 />
84
+ <Counter2 />
85
+ </CounterProvider>
86
+ </div>
87
+ );
88
+ }
89
+ ```
90
+
91
+ ### useHasParentContext
92
+
93
+ This helper hook will allow you to know if a component is wrapped by a context selector provider
94
+
95
+ ```tsx
96
+ const Foo = () => {
97
+ // An easy way to test if a context provider is wrapped around this component
98
+ // since it's more complicated to compare with a default context value
99
+ const isWrappedWithContext = useHasParentContext(CounterContext);
100
+
101
+ if (isWrappedWithContext) {
102
+ return <div>I am inside context selector provider</div>;
103
+ } else {
104
+ return <div>I can only use default context value</div>;
105
+ }
106
+ };
107
+ ```
108
+
109
+ ## Technical memo
110
+
111
+ React context by nature triggers propagation of component re-rendering if a value is changed. To avoid this, this library uses undocumented feature of `calculateChangedBits`. It then uses a subscription model to force update when a component needs to re-render.
112
+
113
+ ## Limitations
114
+
115
+ - In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.
116
+ - `<Consumer />` components are not supported.
117
+ - The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland. (workaround with try-catch)
118
+
119
+ ## Related projects
120
+
121
+ The implementation is heavily inspired by:
122
+
123
+ - [use-context-selector](https://github.com/dai-shi/use-context-selector)
124
+ - [react-tracked](https://github.com/dai-shi/react-tracked)
@@ -0,0 +1,44 @@
1
+ import * as React_2 from 'react';
2
+
3
+ export declare type Context<Value> = React_2.Context<Value> & {
4
+ Provider: React_2.FC<React_2.ProviderProps<Value>>;
5
+ Consumer: never;
6
+ };
7
+
8
+ export declare type ContextSelector<Value, SelectedValue> = (value: Value) => SelectedValue;
9
+
10
+ export declare type ContextValue<Value> = {
11
+ /** Holds a set of subscribers from components. */
12
+ listeners: ((payload: readonly [ContextVersion, Value]) => void)[];
13
+ /** Holds an actual value of React's context that will be propagated down for computations. */
14
+ value: React_2.MutableRefObject<Value>;
15
+ /** A version field is used to sync a context value and consumers. */
16
+ version: React_2.MutableRefObject<ContextVersion>;
17
+ };
18
+
19
+ export declare type ContextValues<Value> = ContextValue<Value> & {
20
+ /** List of listners to publish changes */
21
+ listeners: ((payload: readonly [ContextVersion, Record<string, Value>]) => void)[];
22
+ };
23
+
24
+ export declare type ContextVersion = number;
25
+
26
+ export declare const createContext: <Value>(defaultValue: Value) => Context<Value>;
27
+
28
+ /**
29
+ * This hook returns context selected value by selector.
30
+ * It will only accept context created by `createContext`.
31
+ * It will trigger re-render if only the selected value is referencially changed.
32
+ */
33
+ export declare const useContextSelector: <Value, SelectedValue>(context: Context<Value>, selector: ContextSelector<Value, SelectedValue>) => SelectedValue;
34
+
35
+ /**
36
+ * Utility hook for contexts created by react-context-selector to determine if a parent context exists
37
+ * WARNING: This hook will not work for native React contexts
38
+ *
39
+ * @param context - context created by react-context-selector
40
+ * @returns whether the hook is wrapped by a parent context
41
+ */
42
+ export declare function useHasParentContext<Value>(context: Context<Value>): boolean;
43
+
44
+ export { }
@@ -0,0 +1,2 @@
1
+ import { Context } from './types';
2
+ export declare const createContext: <Value>(defaultValue: Value) => Context<Value>;