( request: Request, task: Task, keyPath: KeyNode, context: ReactContext<any>, props: Object, )
| 2756 | } |
| 2757 | |
| 2758 | function renderContextProvider( |
| 2759 | request: Request, |
| 2760 | task: Task, |
| 2761 | keyPath: KeyNode, |
| 2762 | context: ReactContext<any>, |
| 2763 | props: Object, |
| 2764 | ): void { |
| 2765 | const value = props.value; |
| 2766 | const children = props.children; |
| 2767 | let prevSnapshot; |
| 2768 | if (__DEV__) { |
| 2769 | prevSnapshot = task.context; |
| 2770 | } |
| 2771 | const prevKeyPath = task.keyPath; |
| 2772 | task.context = pushProvider(context, value); |
| 2773 | task.keyPath = keyPath; |
| 2774 | renderNodeDestructive(request, task, children, -1); |
| 2775 | task.context = popProvider(context); |
| 2776 | task.keyPath = prevKeyPath; |
| 2777 | if (__DEV__) { |
| 2778 | if (prevSnapshot !== task.context) { |
| 2779 | console.error( |
| 2780 | 'Popping the context provider did not return back to the original snapshot. This is a bug in React.', |
| 2781 | ); |
| 2782 | } |
| 2783 | } |
| 2784 | } |
| 2785 | |
| 2786 | function renderLazyComponent( |
| 2787 | request: Request, |
no test coverage detected