diff --git a/packages/react/src/__tests__/createReactClassIntegration-test.js b/packages/react/src/__tests__/createReactClassIntegration-test.js index a97d14925bb31..e7b06e48c8359 100644 --- a/packages/react/src/__tests__/createReactClassIntegration-test.js +++ b/packages/react/src/__tests__/createReactClassIntegration-test.js @@ -497,4 +497,22 @@ describe('create-react-class-integration', () => { 'after unmount: false', ]); }); + + it('should support the new static getDerivedStateFromProps method', () => { + let instance; + const Component = createReactClass({ + statics: { + getDerivedStateFromProps: function() { + return {foo: 'bar'}; + }, + }, + + render: function() { + instance = this; + return null; + }, + }); + ReactDOM.render(, document.createElement('div')); + expect(instance.state.foo).toBe('bar'); + }); });