( current: Fiber | null, workInProgress: Fiber, renderLanes: Lanes, )
| 3605 | let hasWarnedAboutUsingNoValuePropOnContextProvider = false; |
| 3606 | |
| 3607 | function updateContextProvider( |
| 3608 | current: Fiber | null, |
| 3609 | workInProgress: Fiber, |
| 3610 | renderLanes: Lanes, |
| 3611 | ) { |
| 3612 | const context: ReactContext<any> = workInProgress.type; |
| 3613 | const newProps = workInProgress.pendingProps; |
| 3614 | const newValue = newProps.value; |
| 3615 | |
| 3616 | if (__DEV__) { |
| 3617 | if (!('value' in newProps)) { |
| 3618 | if (!hasWarnedAboutUsingNoValuePropOnContextProvider) { |
| 3619 | hasWarnedAboutUsingNoValuePropOnContextProvider = true; |
| 3620 | console.error( |
| 3621 | 'The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?', |
| 3622 | ); |
| 3623 | } |
| 3624 | } |
| 3625 | } |
| 3626 | |
| 3627 | pushProvider(workInProgress, context, newValue); |
| 3628 | |
| 3629 | const newChildren = newProps.children; |
| 3630 | reconcileChildren(current, workInProgress, newChildren, renderLanes); |
| 3631 | return workInProgress.child; |
| 3632 | } |
| 3633 | |
| 3634 | function updateContextConsumer( |
| 3635 | current: Fiber | null, |
no test coverage detected