@@ -818,6 +818,7 @@ describe(`AppContainer (dev)`, () => {
818
818
819
819
class MountSpy extends PureComponent {
820
820
static displayName = 'MountSpy'
821
+
821
822
componentWillUnmount ( ) {
822
823
spy ( )
823
824
}
@@ -826,6 +827,7 @@ describe(`AppContainer (dev)`, () => {
826
827
return < span > I am old</ span >
827
828
}
828
829
}
830
+
829
831
const FRW = React . forwardRef ( ( ) => (
830
832
< span >
831
833
< MountSpy />
@@ -851,6 +853,7 @@ describe(`AppContainer (dev)`, () => {
851
853
{
852
854
class MountSpy extends PureComponent {
853
855
static displayName = 'MountSpy'
856
+
854
857
componentWillUnmount ( ) {
855
858
spy ( )
856
859
}
@@ -859,6 +862,7 @@ describe(`AppContainer (dev)`, () => {
859
862
return < span > I am new</ span >
860
863
}
861
864
}
865
+
862
866
const FRW = React . forwardRef ( ( ) => (
863
867
< span >
864
868
< MountSpy />
@@ -882,6 +886,7 @@ describe(`AppContainer (dev)`, () => {
882
886
883
887
class MountSpy extends PureComponent {
884
888
static displayName = 'MountSpy'
889
+
885
890
componentWillUnmount ( ) {
886
891
spy ( )
887
892
}
@@ -921,6 +926,7 @@ describe(`AppContainer (dev)`, () => {
921
926
{
922
927
class MountSpy extends PureComponent {
923
928
static displayName = 'MountSpy'
929
+
924
930
componentWillUnmount ( ) {
925
931
spy ( )
926
932
}
@@ -1651,19 +1657,25 @@ describe(`AppContainer (dev)`, () => {
1651
1657
}
1652
1658
1653
1659
let child = 1
1654
- const childA = ( ) => (
1655
- < div >
1656
- a < MountSpy />
1657
- </ div >
1658
- )
1659
- const childB = ( ) => (
1660
- < div >
1661
- b < MountSpy />
1662
- </ div >
1663
- )
1660
+ const childs = [
1661
+ function Child ( ) {
1662
+ return (
1663
+ < div >
1664
+ a < MountSpy />
1665
+ </ div >
1666
+ )
1667
+ } ,
1668
+ function Child ( ) {
1669
+ return (
1670
+ < div >
1671
+ b < MountSpy />
1672
+ </ div >
1673
+ )
1674
+ } ,
1675
+ ]
1664
1676
1665
1677
function getChild ( ) {
1666
- return child === 1 ? childA : childB
1678
+ return child === 1 ? childs [ 0 ] : childs [ 1 ]
1667
1679
}
1668
1680
1669
1681
class Layout extends Component {
0 commit comments