MCPcopy
hub / github.com/react/react / mountActivityChildren

Function mountActivityChildren

packages/react-reconciler/src/ReactFiberBeginWork.js:891–928  ·  view source on GitHub ↗
(
  workInProgress: Fiber,
  nextProps: ActivityProps,
  renderLanes: Lanes,
)

Source from the content-addressed store, hash-verified

889}
890
891function mountActivityChildren(
892 workInProgress: Fiber,
893 nextProps: ActivityProps,
894 renderLanes: Lanes,
895) {
896 if (__DEV__) {
897 const hiddenProp = (nextProps: any).hidden;
898 if (hiddenProp !== undefined) {
899 console.error(
900 '<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n' +
901 '- <Activity %s>\n' +
902 '+ <Activity %s>',
903 hiddenProp === true
904 ? 'hidden'
905 : hiddenProp === false
906 ? 'hidden={false}'
907 : 'hidden={...}',
908 hiddenProp ? 'mode="hidden"' : 'mode="visible"',
909 );
910 }
911 }
912 const nextChildren = nextProps.children;
913 const nextMode = nextProps.mode;
914 const mode = workInProgress.mode;
915 const offscreenChildProps: OffscreenProps = {
916 mode: nextMode,
917 children: nextChildren,
918 };
919 const primaryChildFragment = mountWorkInProgressOffscreenFiber(
920 offscreenChildProps,
921 mode,
922 renderLanes,
923 );
924 primaryChildFragment.ref = workInProgress.ref;
925 workInProgress.child = primaryChildFragment;
926 primaryChildFragment.return = workInProgress;
927 return primaryChildFragment;
928}
929
930function retryActivityComponentWithoutHydrating(
931 current: Fiber,

Calls 2

errorMethod · 0.65

Tested by

no test coverage detected