Skip to content

Commit dec00a8

Browse files
cmfcmftimdorr
authored andcommitted
Pass through props.context to connected component (#1278)
1 parent 8605088 commit dec00a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/connectAdvanced.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ export default function connectAdvanced(
160160
// Distinguish between actual "data" props that were passed to the wrapper component,
161161
// and values needed to control behavior (forwarded refs, alternate context instances).
162162
// To maintain the wrapperProps object reference, memoize this destructuring.
163-
const { context, forwardedRef, ...wrapperProps } = props
164-
return [context, forwardedRef, wrapperProps]
163+
const { forwardedRef, ...wrapperProps } = props
164+
return [props.context, forwardedRef, wrapperProps]
165165
}, [props])
166166

167167
const ContextToUse = useMemo(() => {

0 commit comments

Comments
 (0)