Skip to content

Commit ea4af2a

Browse files
committed
fix storeKey error, allow unstable_observedBits
1 parent 4855c84 commit ea4af2a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-redux",
3-
"version": "5.1.0-test.1",
3+
"version": "6.0.0-alpha.1",
44
"description": "Official React bindings for Redux",
55
"keywords": [
66
"react",

src/components/connectAdvanced.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ export default function connectAdvanced(
146146
'Passing redux store in props has been removed and does not do anything. ' +
147147
'To use a custom redux store for a single component, ' +
148148
'create a custom React context with React.createContext() and pass the Provider to react-redux\'s provider ' +
149-
'and the Consumer to this component as in <Provider context={context.Provider}><' +
150-
wrappedComponentName + ' consumer={context.Consumer} /></Provider>'
149+
'and the Consumer to this component\'s connect as in <Provider context={context.Provider}></Provider>' +
150+
` and connect(mapState, mapDispatch, undefined, { consumer=context.consumer })(${wrappedComponentName})`
151151
)
152152
this.generatedDerivedProps = this.makeDerivedPropsGenerator()
153153
this.renderWrappedComponent = this.renderWrappedComponent.bind(this)
@@ -212,6 +212,13 @@ export default function connectAdvanced(
212212
}
213213

214214
render() {
215+
if (this.props.unstable_observedBits) {
216+
return (
217+
<Consumer unstable_observedBits={this.props.unstable_observedBits}>
218+
{this.renderWrappedComponent}
219+
</Consumer>
220+
)
221+
}
215222
return (
216223
<Consumer>
217224
{this.renderWrappedComponent}

0 commit comments

Comments
 (0)