diff --git a/src/components/connect.js b/src/components/connect.js index 3a98814..e1f053a 100644 --- a/src/components/connect.js +++ b/src/components/connect.js @@ -32,6 +32,8 @@ function connectFactory(defaults = {}, options = {}) { 'However, this custom Request would only be used in the default buildRequest.' ) + warning(options.pure === undefined, '`pure` option is no longer supported') + return connect(map, defaults, finalOptions) } diff --git a/test/components/connect.spec.js b/test/components/connect.spec.js index 54896fc..fe58cc0 100644 --- a/test/components/connect.spec.js +++ b/test/components/connect.spec.js @@ -1280,7 +1280,6 @@ describe('React', () => { expect(invocationCount).toEqual(2) }) - // TODO: clean up test it('should deprecate mapPropsToRequestsToProps with context', () => { let consoleSpy = expect.spyOn(console, 'error') @@ -1370,6 +1369,25 @@ describe('React', () => { ]) }) + it('should warn if pure option is present', () => { + let consoleSpy = expect.spyOn(console, 'error') + + @connect.options({ pure: false })(() => { + return {} + }) + class C extends Component { + render() { + return
+ } + } + + TestUtils.renderIntoDocument( +