@@ -96,9 +96,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
9696 } ;
9797 }
9898
99- // 18 has an experimental flag to warn about reading refs. Will circumvent
100- // when built-in API is implemented.
101- // @gate !enableUseRefAccessWarning || !__DEV__
10299 test ( 'basic usage' , ( ) => {
103100 const store = createExternalStore ( 'Initial' ) ;
104101
@@ -141,9 +138,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
141138 expect ( root ) . toMatchRenderedOutput ( 'Initial' ) ;
142139 } ) ;
143140
144- // 18 has an experimental flag to warn about reading refs. Will circumvent
145- // when built-in API is implemented.
146- // @gate !enableUseRefAccessWarning || !__DEV__
147141 test ( 'switch to a different store' , ( ) => {
148142 const storeA = createExternalStore ( 0 ) ;
149143 const storeB = createExternalStore ( 0 ) ;
@@ -193,9 +187,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
193187 expect ( root ) . toMatchRenderedOutput ( '1' ) ;
194188 } ) ;
195189
196- // 18 has an experimental flag to warn about reading refs. Will circumvent
197- // when built-in API is implemented.
198- // @gate !enableUseRefAccessWarning || !__DEV__
199190 test ( 'selecting a specific value inside getSnapshot' , ( ) => {
200191 const store = createExternalStore ( { a : 0 , b : 0 } ) ;
201192
@@ -239,9 +230,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
239230 expect ( root ) . toMatchRenderedOutput ( 'A1B1' ) ;
240231 } ) ;
241232
242- // 18 has an experimental flag to warn about reading refs. Will circumvent
243- // when built-in API is implemented.
244- // @gate !enableUseRefAccessWarning || !__DEV__
245233 test (
246234 "compares to current state before bailing out, even when there's a " +
247235 'mutation in between the sync and passive effects' ,
@@ -284,9 +272,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
284272 } ,
285273 ) ;
286274
287- // 18 has an experimental flag to warn about reading refs. Will circumvent
288- // when built-in API is implemented.
289- // @gate !enableUseRefAccessWarning || !__DEV__
290275 test ( 'mutating the store in between render and commit when getSnapshot has changed' , ( ) => {
291276 const store = createExternalStore ( { a : 1 , b : 1 } ) ;
292277
@@ -345,9 +330,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
345330 expect ( root ) . toMatchRenderedOutput ( 'B2' ) ;
346331 } ) ;
347332
348- // 18 has an experimental flag to warn about reading refs. Will circumvent
349- // when built-in API is implemented.
350- // @gate !enableUseRefAccessWarning || !__DEV__
351333 test ( 'mutating the store in between render and commit when getSnapshot has _not_ changed' , ( ) => {
352334 // Same as previous test, but `getSnapshot` does not change
353335 const store = createExternalStore ( { a : 1 , b : 1 } ) ;
@@ -405,9 +387,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
405387 expect ( root ) . toMatchRenderedOutput ( 'A1' ) ;
406388 } ) ;
407389
408- // 18 has an experimental flag to warn about reading refs. Will circumvent
409- // when built-in API is implemented.
410- // @gate !enableUseRefAccessWarning || !__DEV__
411390 test ( "does not bail out if the previous update hasn't finished yet" , ( ) => {
412391 const store = createExternalStore ( 0 ) ;
413392
@@ -443,9 +422,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
443422 expect ( root ) . toMatchRenderedOutput ( '00' ) ;
444423 } ) ;
445424
446- // 18 has an experimental flag to warn about reading refs. Will circumvent
447- // when built-in API is implemented.
448- // @gate !enableUseRefAccessWarning || !__DEV__
449425 test ( 'uses the latest getSnapshot, even if it changed in the same batch as a store update' , ( ) => {
450426 const store = createExternalStore ( { a : 0 , b : 0 } ) ;
451427
@@ -473,9 +449,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
473449 expect ( root ) . toMatchRenderedOutput ( '2' ) ;
474450 } ) ;
475451
476- // 18 has an experimental flag to warn about reading refs. Will circumvent
477- // when built-in API is implemented.
478- // @gate !enableUseRefAccessWarning || !__DEV__
479452 test ( 'handles errors thrown by getSnapshot or isEqual' , ( ) => {
480453 class ErrorBoundary extends React . Component {
481454 state = { error : null } ;
@@ -552,9 +525,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
552525 } ) ;
553526
554527 describe ( 'extra features implemented in user-space' , ( ) => {
555- // 18 has an experimental flag to warn about reading refs. Will circumvent
556- // when built-in API is implemented.
557- // @gate !enableUseRefAccessWarning || !__DEV__
558528 test ( 'memoized selectors are only called once per update' , ( ) => {
559529 const store = createExternalStore ( { a : 0 , b : 0 } ) ;
560530
@@ -593,9 +563,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
593563 expect ( root ) . toMatchRenderedOutput ( 'A1' ) ;
594564 } ) ;
595565
596- // 18 has an experimental flag to warn about reading refs. Will circumvent
597- // when built-in API is implemented.
598- // @gate !enableUseRefAccessWarning || !__DEV__
599566 test ( 'Using isEqual to bailout' , ( ) => {
600567 const store = createExternalStore ( { a : 0 , b : 0 } ) ;
601568
0 commit comments