@fluentui/react-context-selector 0.0.0-nightly050f89bf0020211102.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,449 @@
1
+ # Change Log - @fluentui/react-context-selector
2
+
3
+ This log was last generated on Tue, 02 Nov 2021 08:40:44 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [0.0.0-nightly050f89bf0020211102.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.0.0-nightly050f89bf0020211102.1)
8
+
9
+ Tue, 02 Nov 2021 08:40:44 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-nightly050f89bf0020211102.1)
11
+
12
+ ### Changes
13
+
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/40469cc9aef788dfd49e97df32d6aed267c2cc26) by email not defined)
15
+ - Bump @fluentui/react-utilities to v0.0.0-nightly050f89bf0020211102.1 ([commit](https://github.com/microsoft/fluentui/commit/40469cc9aef788dfd49e97df32d6aed267c2cc26) by beachball)
16
+
17
+ ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-beta.2)
18
+
19
+ Wed, 27 Oct 2021 12:14:24 GMT
20
+ [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)
21
+
22
+ ### Changes
23
+
24
+ - Bump @fluentui/react-utilities to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
25
+
26
+ ## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-beta.1)
27
+
28
+ Wed, 06 Oct 2021 10:37:22 GMT
29
+ [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)
30
+
31
+ ### Changes
32
+
33
+ - Bump all v9 components to beta prerelease tag ([PR #20106](https://github.com/microsoft/fluentui/pull/20106) by lingfangao@hotmail.com)
34
+ - Bump @fluentui/react-utilities to v9.0.0-beta.1 ([PR #20106](https://github.com/microsoft/fluentui/pull/20106) by beachball)
35
+
36
+ ## [9.0.0-alpha.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.39)
37
+
38
+ Tue, 05 Oct 2021 09:28:07 GMT
39
+ [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)
40
+
41
+ ### Changes
42
+
43
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.56 ([PR #20081](https://github.com/microsoft/fluentui/pull/20081) by beachball)
44
+
45
+ ## [9.0.0-alpha.38](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.38)
46
+
47
+ Fri, 01 Oct 2021 14:13:08 GMT
48
+ [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)
49
+
50
+ ### Changes
51
+
52
+ - Bump v9 prerelease versions to rerelease ([PR #20069](https://github.com/microsoft/fluentui/pull/20069) by lingfangao@hotmail.com)
53
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.55 ([PR #20069](https://github.com/microsoft/fluentui/pull/20069) by beachball)
54
+
55
+ ## [9.0.0-alpha.36](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.36)
56
+
57
+ Mon, 27 Sep 2021 08:06:00 GMT
58
+ [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)
59
+
60
+ ### Changes
61
+
62
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.53 ([PR #19981](https://github.com/microsoft/fluentui/pull/19981) by beachball)
63
+
64
+ ## [9.0.0-alpha.35](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.35)
65
+
66
+ Fri, 24 Sep 2021 09:17:17 GMT
67
+ [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)
68
+
69
+ ### Changes
70
+
71
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.52 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball)
72
+
73
+ ## [9.0.0-alpha.34](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.34)
74
+
75
+ Thu, 23 Sep 2021 08:21:34 GMT
76
+ [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)
77
+
78
+ ### Changes
79
+
80
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.51 ([commit](https://github.com/microsoft/fluentui/commit/95682da34c48813f7658032ae490d21d2f363b90) by beachball)
81
+
82
+ ## [9.0.0-alpha.33](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.33)
83
+
84
+ Wed, 22 Sep 2021 10:10:07 GMT
85
+ [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)
86
+
87
+ ### Changes
88
+
89
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.50 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
90
+
91
+ ## [9.0.0-alpha.32](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.32)
92
+
93
+ Fri, 17 Sep 2021 07:35:26 GMT
94
+ [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)
95
+
96
+ ### Changes
97
+
98
+ - 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)
99
+
100
+ ## [9.0.0-alpha.31](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.31)
101
+
102
+ Thu, 16 Sep 2021 07:38:39 GMT
103
+ [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)
104
+
105
+ ### Changes
106
+
107
+ - Bump @fluentui/react-context-selector to v9.0.0-alpha.31 ([PR #19815](https://github.com/microsoft/fluentui/pull/19815) by behowell@microsoft.com)
108
+
109
+ ## [9.0.0-alpha.30](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.30)
110
+
111
+ Tue, 14 Sep 2021 20:09:02 GMT
112
+ [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)
113
+
114
+ ### Changes
115
+
116
+ - Bump @fluentui/react-context-selector to v9.0.0-alpha.30 ([PR #19155](https://github.com/microsoft/fluentui/pull/19155) by bsunderhus@microsoft.com)
117
+
118
+ ## [9.0.0-alpha.29](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.29)
119
+
120
+ Fri, 10 Sep 2021 16:31:53 GMT
121
+ [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)
122
+
123
+ ### Changes
124
+
125
+ - 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)
126
+ - Bump @fluentui/react-context-selector to v9.0.0-alpha.29 ([PR #19748](https://github.com/microsoft/fluentui/pull/19748) by lingfangao@hotmail.com)
127
+
128
+ ## [9.0.0-alpha.28](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.28)
129
+
130
+ Fri, 10 Sep 2021 07:39:51 GMT
131
+ [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)
132
+
133
+ ### Changes
134
+
135
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.45 ([PR #19642](https://github.com/microsoft/fluentui/pull/19642) by behowell@microsoft.com)
136
+
137
+ ## [9.0.0-alpha.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.27)
138
+
139
+ Mon, 06 Sep 2021 07:34:53 GMT
140
+ [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)
141
+
142
+ ### Changes
143
+
144
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.44 ([PR #19640](https://github.com/microsoft/fluentui/pull/19640) by lingfangao@hotmail.com)
145
+
146
+ ## [9.0.0-alpha.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.26)
147
+
148
+ Wed, 01 Sep 2021 07:39:56 GMT
149
+ [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)
150
+
151
+ ### Changes
152
+
153
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.43 ([PR #19483](https://github.com/microsoft/fluentui/pull/19483) by bsunderhus@microsoft.com)
154
+
155
+ ## [9.0.0-alpha.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.25)
156
+
157
+ Tue, 31 Aug 2021 07:37:47 GMT
158
+ [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)
159
+
160
+ ### Changes
161
+
162
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.42 ([PR #19556](https://github.com/microsoft/fluentui/pull/19556) by lingfan.gao@microsoft.com)
163
+
164
+ ## [9.0.0-alpha.24](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.24)
165
+
166
+ Fri, 20 Aug 2021 07:37:28 GMT
167
+ [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)
168
+
169
+ ### Changes
170
+
171
+ - Update .npmignore ([PR #19441](https://github.com/microsoft/fluentui/pull/19441) by elcraig@microsoft.com)
172
+
173
+ ## [9.0.0-alpha.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.23)
174
+
175
+ Thu, 19 Aug 2021 07:41:35 GMT
176
+ [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)
177
+
178
+ ### Changes
179
+
180
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.39 ([PR #19273](https://github.com/microsoft/fluentui/pull/19273) by bsunderhus@microsoft.com)
181
+
182
+ ## [9.0.0-alpha.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.22)
183
+
184
+ Fri, 06 Aug 2021 07:35:14 GMT
185
+ [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)
186
+
187
+ ### Changes
188
+
189
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.38 ([PR #19189](https://github.com/microsoft/fluentui/pull/19189) by bsunderhus@microsoft.com)
190
+
191
+ ## [9.0.0-alpha.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.21)
192
+
193
+ Tue, 03 Aug 2021 07:39:30 GMT
194
+ [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)
195
+
196
+ ### Patches
197
+
198
+ - Bump @fluentui/eslint-plugin to v1.3.3 ([PR #19169](https://github.com/microsoft/fluentui/pull/19169) by behowell@microsoft.com)
199
+ - Bump @fluentui/scripts to v1.0.0 ([PR #19169](https://github.com/microsoft/fluentui/pull/19169) by behowell@microsoft.com)
200
+
201
+ ### Changes
202
+
203
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.37 ([PR #19169](https://github.com/microsoft/fluentui/pull/19169) by behowell@microsoft.com)
204
+
205
+ ## [9.0.0-alpha.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.20)
206
+
207
+ Mon, 02 Aug 2021 07:36:20 GMT
208
+ [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)
209
+
210
+ ### Changes
211
+
212
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.36 ([PR #19204](https://github.com/microsoft/fluentui/pull/19204) by lingfan.gao@microsoft.com)
213
+
214
+ ## [9.0.0-alpha.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.19)
215
+
216
+ Fri, 23 Jul 2021 07:38:19 GMT
217
+ [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)
218
+
219
+ ### Changes
220
+
221
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.35 ([PR #18610](https://github.com/microsoft/fluentui/pull/18610) by behowell@microsoft.com)
222
+
223
+ ## [9.0.0-alpha.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.18)
224
+
225
+ Thu, 22 Jul 2021 07:36:55 GMT
226
+ [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)
227
+
228
+ ### Changes
229
+
230
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.34 ([PR #19023](https://github.com/microsoft/fluentui/pull/19023) by behowell@microsoft.com)
231
+
232
+ ## [9.0.0-alpha.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.17)
233
+
234
+ Thu, 15 Jul 2021 07:36:18 GMT
235
+ [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)
236
+
237
+ ### Changes
238
+
239
+ - 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)
240
+
241
+ ## [9.0.0-alpha.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.16)
242
+
243
+ Fri, 09 Jul 2021 07:39:31 GMT
244
+ [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)
245
+
246
+ ### Patches
247
+
248
+ - Bump @fluentui/eslint-plugin to v1.3.2 ([PR #18808](https://github.com/microsoft/fluentui/pull/18808) by martinhochel@microsoft.com)
249
+ - Bump @fluentui/scripts to v1.0.0 ([PR #18808](https://github.com/microsoft/fluentui/pull/18808) by martinhochel@microsoft.com)
250
+
251
+ ### Changes
252
+
253
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.32 ([PR #18808](https://github.com/microsoft/fluentui/pull/18808) by martinhochel@microsoft.com)
254
+
255
+ ## [9.0.0-alpha.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.15)
256
+
257
+ Fri, 02 Jul 2021 23:15:55 GMT
258
+ [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)
259
+
260
+ ### Changes
261
+
262
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.31 ([PR #18721](https://github.com/microsoft/fluentui/pull/18721) by bsunderhus@microsoft.com)
263
+
264
+ ## [9.0.0-alpha.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.14)
265
+
266
+ Fri, 02 Jul 2021 07:37:06 GMT
267
+ [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)
268
+
269
+ ### Changes
270
+
271
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.30 ([PR #18796](https://github.com/microsoft/fluentui/pull/18796) by bsunderhus@microsoft.com)
272
+
273
+ ## [9.0.0-alpha.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.13)
274
+
275
+ Tue, 15 Jun 2021 07:40:20 GMT
276
+ [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)
277
+
278
+ ### Changes
279
+
280
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.29 ([PR #18521](https://github.com/microsoft/fluentui/pull/18521) by behowell@microsoft.com)
281
+
282
+ ## [9.0.0-alpha.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.12)
283
+
284
+ Mon, 07 Jun 2021 07:38:15 GMT
285
+ [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)
286
+
287
+ ### Patches
288
+
289
+ - Bump @fluentui/eslint-plugin to v1.3.1 ([PR #18437](https://github.com/microsoft/fluentui/pull/18437) by martinhochel@microsoft.com)
290
+ - Bump @fluentui/scripts to v1.0.0 ([PR #18437](https://github.com/microsoft/fluentui/pull/18437) by martinhochel@microsoft.com)
291
+
292
+ ### Changes
293
+
294
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.28 ([PR #18437](https://github.com/microsoft/fluentui/pull/18437) by martinhochel@microsoft.com)
295
+
296
+ ## [9.0.0-alpha.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.11)
297
+
298
+ Fri, 04 Jun 2021 07:37:23 GMT
299
+ [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)
300
+
301
+ ### Changes
302
+
303
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.27 ([PR #18168](https://github.com/microsoft/fluentui/pull/18168) by Humberto.Morimoto@microsoft.com)
304
+
305
+ ## [9.0.0-alpha.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.10)
306
+
307
+ Wed, 26 May 2021 07:35:43 GMT
308
+ [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)
309
+
310
+ ### Changes
311
+
312
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.25 ([PR #18323](https://github.com/microsoft/fluentui/pull/18323) by lingfan.gao@microsoft.com)
313
+
314
+ ## [9.0.0-alpha.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.9)
315
+
316
+ Fri, 21 May 2021 07:34:54 GMT
317
+ [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)
318
+
319
+ ### Changes
320
+
321
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.24 ([PR #18259](https://github.com/microsoft/fluentui/pull/18259) by behowell@microsoft.com)
322
+
323
+ ## [9.0.0-alpha.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.8)
324
+
325
+ Thu, 20 May 2021 07:41:54 GMT
326
+ [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)
327
+
328
+ ### Patches
329
+
330
+ - Bump @fluentui/eslint-plugin to v1.3.0 ([PR #18024](https://github.com/microsoft/fluentui/pull/18024) by elcraig@microsoft.com)
331
+ - Bump @fluentui/scripts to v1.0.0 ([PR #18024](https://github.com/microsoft/fluentui/pull/18024) by elcraig@microsoft.com)
332
+
333
+ ### Changes
334
+
335
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.23 ([PR #18024](https://github.com/microsoft/fluentui/pull/18024) by elcraig@microsoft.com)
336
+
337
+ ## [9.0.0-alpha.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.7)
338
+
339
+ Wed, 19 May 2021 07:34:20 GMT
340
+ [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)
341
+
342
+ ### Changes
343
+
344
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.22 ([PR #18037](https://github.com/microsoft/fluentui/pull/18037) by olfedias@microsoft.com)
345
+
346
+ ## [9.0.0-alpha.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.6)
347
+
348
+ Mon, 03 May 2021 07:45:19 GMT
349
+ [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)
350
+
351
+ ### Changes
352
+
353
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.21 ([PR #18005](https://github.com/microsoft/fluentui/pull/18005) by lingfan.gao@microsoft.com)
354
+
355
+ ## [9.0.0-alpha.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.5)
356
+
357
+ Fri, 30 Apr 2021 07:42:23 GMT
358
+ [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)
359
+
360
+ ### Patches
361
+
362
+ - Bump @fluentui/eslint-plugin to v1.2.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
363
+ - Bump @fluentui/scripts to v1.0.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
364
+
365
+ ### Changes
366
+
367
+ - Upgrade to TS 4.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
368
+
369
+ ## [9.0.0-alpha.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.4)
370
+
371
+ Fri, 23 Apr 2021 07:37:10 GMT
372
+ [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)
373
+
374
+ ### Patches
375
+
376
+ - Bump @fluentui/eslint-plugin to v1.1.1 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
377
+ - Bump @fluentui/scripts to v1.0.0 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
378
+
379
+ ### Changes
380
+
381
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.19 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
382
+
383
+ ## [9.0.0-alpha.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.3)
384
+
385
+ Thu, 22 Apr 2021 07:33:28 GMT
386
+ [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)
387
+
388
+ ### Changes
389
+
390
+ - use useIsomorphicEffect from @fluentui/react-utilities ([PR #17897](https://github.com/microsoft/fluentui/pull/17897) by olfedias@microsoft.com)
391
+
392
+ ## [9.0.0-alpha.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.2)
393
+
394
+ Wed, 31 Mar 2021 00:53:43 GMT
395
+ [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)
396
+
397
+ ### Patches
398
+
399
+ - Bump @fluentui/eslint-plugin to v1.1.0 ([PR #17568](https://github.com/microsoft/fluentui/pull/17568) by elcraig@microsoft.com)
400
+ - Bump @fluentui/scripts to v1.0.0 ([PR #17568](https://github.com/microsoft/fluentui/pull/17568) by elcraig@microsoft.com)
401
+
402
+ ## [9.0.0-alpha.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.1)
403
+
404
+ Tue, 30 Mar 2021 07:34:45 GMT
405
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.4..@fluentui/react-context-selector_v9.0.0-alpha.1)
406
+
407
+ ### Changes
408
+
409
+ - Bump react-context-selector to v9 ([PR #17350](https://github.com/microsoft/fluentui/pull/17350) by lingfan.gao@microsoft.com)
410
+ - chore: restore "sideEffects" to enable treeshaking ([PR #17584](https://github.com/microsoft/fluentui/pull/17584) by olfedias@microsoft.com)
411
+
412
+ ## [0.53.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.4)
413
+
414
+ Mon, 15 Mar 2021 07:36:20 GMT
415
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.3..@fluentui/react-context-selector_v0.53.4)
416
+
417
+ ### Patches
418
+
419
+ - Remove set-version references ([PR #17381](https://github.com/microsoft/fluentui/pull/17381) by elcraig@microsoft.com)
420
+
421
+ ## [0.53.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.3)
422
+
423
+ Fri, 26 Feb 2021 01:16:27 GMT
424
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.2..@fluentui/react-context-selector_v0.53.3)
425
+
426
+ ### Patches
427
+
428
+ - update references to major-bumped packages ([PR #17169](https://github.com/microsoft/fluentui/pull/17169) by elcraig@microsoft.com)
429
+
430
+ ## [0.53.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.2)
431
+
432
+ Mon, 22 Feb 2021 12:26:22 GMT
433
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.0..@fluentui/react-context-selector_v0.53.2)
434
+
435
+ ### Patches
436
+
437
+ - Manually bump react-context-selector ([PR #17084](https://github.com/microsoft/fluentui/pull/17084) by elcraig@microsoft.com)
438
+
439
+ ## [0.53.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.0)
440
+
441
+ Thu, 18 Feb 2021 19:38:50 GMT
442
+
443
+ ### Minor changes
444
+
445
+ - Remove useContextSelectors to align with proposed React implementation ([PR #17049](https://github.com/microsoft/fluentui/pull/17049) by lingfan.gao@microsoft.com)
446
+
447
+ ### Patches
448
+
449
+ - 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>;