@@ -347,29 +347,42 @@ import Store from './Store';
347
347
Store.subscribe();
348
348
const Header = styled.div\` color: red\` ;
349
349
_c = Header;
350
- const Factory = funny.factory\`\` ;
350
+ const StyledFactory1 = styled('div')\` color: hotpink\` ;
351
+ _c2 = StyledFactory1;
352
+ const StyledFactory2 = styled('div')({
353
+ color : ' hotpink'
354
+ } );
355
+ _c3 = StyledFactory2;
356
+ const StyledFactory3 = styled(A)({
357
+ color : ' hotpink'
358
+ } );
359
+ _c4 = StyledFactory3;
360
+ const FunnyFactory = funny.factory\`\` ;
351
361
let Alias1 = A;
352
362
let Alias2 = A.Foo;
353
363
const Dict = { } ;
354
364
355
365
function Foo() {
356
- return <div ><A /><B /><Alias1 /><Alias2 /><Header /><Dict.X /></div >;
366
+ return <div ><A /><B /><StyledFactory1 />< StyledFactory2 />< StyledFactory3 />< Alias1 /><Alias2 /><Header /><Dict.X /></div >;
357
367
}
358
368
359
- _c2 = Foo;
369
+ _c5 = Foo;
360
370
const B = hoc(A); // This is currently registered as a false positive:
361
371
362
- _c3 = B;
372
+ _c6 = B;
363
373
const NotAComponent = wow(A); // We could avoid it but it also doesn't hurt.
364
374
365
- _c4 = NotAComponent;
375
+ _c7 = NotAComponent;
366
376
367
- var _c, _c2, _c3, _c4;
377
+ var _c, _c2, _c3, _c4, _c5, _c6, _c7 ;
368
378
369
379
$RefreshReg$(_c, "Header");
370
- $RefreshReg$(_c2, "Foo");
371
- $RefreshReg$(_c3, "B");
372
- $RefreshReg$(_c4, "NotAComponent");
380
+ $RefreshReg$(_c2, "StyledFactory1");
381
+ $RefreshReg$(_c3, "StyledFactory2");
382
+ $RefreshReg$(_c4, "StyledFactory3");
383
+ $RefreshReg$(_c5, "Foo");
384
+ $RefreshReg$(_c6, "B");
385
+ $RefreshReg$(_c7, "NotAComponent");
373
386
` ;
374
387
375
388
exports [` ReactFreshBabelPlugin registers identifiers used in React.createElement at definition site 1` ] = `
@@ -378,30 +391,43 @@ import Store from './Store';
378
391
Store.subscribe();
379
392
const Header = styled.div\` color: red\` ;
380
393
_c = Header;
381
- const Factory = funny.factory\`\` ;
394
+ const StyledFactory1 = styled('div')\` color: hotpink\` ;
395
+ _c2 = StyledFactory1;
396
+ const StyledFactory2 = styled('div')({
397
+ color : ' hotpink'
398
+ } );
399
+ _c3 = StyledFactory2;
400
+ const StyledFactory3 = styled(A)({
401
+ color : ' hotpink'
402
+ } );
403
+ _c4 = StyledFactory3;
404
+ const FunnyFactory = funny.factory\`\` ;
382
405
let Alias1 = A;
383
406
let Alias2 = A.Foo;
384
407
const Dict = { } ;
385
408
386
409
function Foo() {
387
- return [React .createElement (A ), React .createElement (B ), React .createElement (Alias1 ), React .createElement (Alias2 ), jsx (Header ), React .createElement (Dict .X )];
410
+ return [React .createElement (A ), React .createElement (B ), React .createElement (StyledFactory1 ), React . createElement ( StyledFactory2 ), React . createElement ( StyledFactory3 ), React . createElement ( Alias1 ), React .createElement (Alias2 ), jsx (Header ), React .createElement (Dict .X )];
388
411
}
389
412
390
- _c2 = Foo;
413
+ _c5 = Foo;
391
414
React.createContext(Store);
392
415
const B = hoc(A); // This is currently registered as a false positive:
393
416
394
- _c3 = B;
417
+ _c6 = B;
395
418
const NotAComponent = wow(A); // We could avoid it but it also doesn't hurt.
396
419
397
- _c4 = NotAComponent;
420
+ _c7 = NotAComponent;
398
421
399
- var _c, _c2, _c3, _c4;
422
+ var _c, _c2, _c3, _c4, _c5, _c6, _c7 ;
400
423
401
424
$RefreshReg$(_c, "Header");
402
- $RefreshReg$(_c2, "Foo");
403
- $RefreshReg$(_c3, "B");
404
- $RefreshReg$(_c4, "NotAComponent");
425
+ $RefreshReg$(_c2, "StyledFactory1");
426
+ $RefreshReg$(_c3, "StyledFactory2");
427
+ $RefreshReg$(_c4, "StyledFactory3");
428
+ $RefreshReg$(_c5, "Foo");
429
+ $RefreshReg$(_c6, "B");
430
+ $RefreshReg$(_c7, "NotAComponent");
405
431
` ;
406
432
407
433
exports [` ReactFreshBabelPlugin registers likely HOCs with inline functions 1` ] = `
0 commit comments