Skip to content

Commit

Permalink
Pass through props.context to connected component (#1278)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmfcmf authored and timdorr committed May 8, 2019
1 parent 8605088 commit dec00a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/connectAdvanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ export default function connectAdvanced(
// Distinguish between actual "data" props that were passed to the wrapper component,
// and values needed to control behavior (forwarded refs, alternate context instances).
// To maintain the wrapperProps object reference, memoize this destructuring.
const { context, forwardedRef, ...wrapperProps } = props
return [context, forwardedRef, wrapperProps]
const { forwardedRef, ...wrapperProps } = props
return [props.context, forwardedRef, wrapperProps]
}, [props])

const ContextToUse = useMemo(() => {
Expand Down

0 comments on commit dec00a8

Please sign in to comment.