Skip to content

Commit 31af392

Browse files
author
Brian Vaughn
committed
Removed unnecessary gDSFP from test
1 parent 0a041c5 commit 31af392

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

packages/react-hooks/src/__tests__/useSubscription-test.internal.js

+2-26
Original file line numberDiff line numberDiff line change
@@ -205,18 +205,6 @@ describe('useSubscription', () => {
205205
}
206206

207207
class Parent extends React.Component {
208-
state = {};
209-
210-
static getDerivedStateFromProps(nextProps, prevState) {
211-
if (nextProps.observed !== prevState.observed) {
212-
return {
213-
observed: nextProps.observed,
214-
};
215-
}
216-
217-
return null;
218-
}
219-
220208
componentDidMount() {
221209
log.push('Parent.componentDidMount');
222210
}
@@ -226,7 +214,7 @@ describe('useSubscription', () => {
226214
}
227215

228216
render() {
229-
return <Subscription source={this.state.observed} />;
217+
return <Subscription source={this.props.observed} />;
230218
}
231219
}
232220

@@ -299,18 +287,6 @@ describe('useSubscription', () => {
299287
}
300288

301289
class Parent extends React.Component {
302-
state = {};
303-
304-
static getDerivedStateFromProps(nextProps, prevState) {
305-
if (nextProps.observed !== prevState.observed) {
306-
return {
307-
observed: nextProps.observed,
308-
};
309-
}
310-
311-
return null;
312-
}
313-
314290
componentDidMount() {
315291
log.push('Parent.componentDidMount');
316292
}
@@ -320,7 +296,7 @@ describe('useSubscription', () => {
320296
}
321297

322298
render() {
323-
return <Subscription source={this.state.observed} />;
299+
return <Subscription source={this.props.observed} />;
324300
}
325301
}
326302

0 commit comments

Comments
 (0)