@@ -347,29 +347,42 @@ import Store from './Store';
347347Store.subscribe();
348348const Header = styled.div\` color: red\` ;
349349_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\`\` ;
351361let Alias1 = A;
352362let Alias2 = A.Foo;
353363const Dict = { } ;
354364
355365function 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 >;
357367}
358368
359- _c2 = Foo;
369+ _c5 = Foo;
360370const B = hoc(A); // This is currently registered as a false positive:
361371
362- _c3 = B;
372+ _c6 = B;
363373const NotAComponent = wow(A); // We could avoid it but it also doesn't hurt.
364374
365- _c4 = NotAComponent;
375+ _c7 = NotAComponent;
366376
367- var _c, _c2, _c3, _c4;
377+ var _c, _c2, _c3, _c4, _c5, _c6, _c7 ;
368378
369379$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");
373386` ;
374387
375388exports [` ReactFreshBabelPlugin registers identifiers used in React.createElement at definition site 1` ] = `
@@ -378,30 +391,43 @@ import Store from './Store';
378391Store.subscribe();
379392const Header = styled.div\` color: red\` ;
380393_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\`\` ;
382405let Alias1 = A;
383406let Alias2 = A.Foo;
384407const Dict = { } ;
385408
386409function 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 )];
388411}
389412
390- _c2 = Foo;
413+ _c5 = Foo;
391414React.createContext(Store);
392415const B = hoc(A); // This is currently registered as a false positive:
393416
394- _c3 = B;
417+ _c6 = B;
395418const NotAComponent = wow(A); // We could avoid it but it also doesn't hurt.
396419
397- _c4 = NotAComponent;
420+ _c7 = NotAComponent;
398421
399- var _c, _c2, _c3, _c4;
422+ var _c, _c2, _c3, _c4, _c5, _c6, _c7 ;
400423
401424$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");
405431` ;
406432
407433exports [` ReactFreshBabelPlugin registers likely HOCs with inline functions 1` ] = `
0 commit comments