Home / Function/ forks../packages/react-client/src/ReactFlightClientConfig.js() — react Function Reference

forks../packages/react-client/src/ReactFlightClientConfig.js() — react Function Reference

Architecture documentation for the forks../packages/react-client/src/ReactFlightClientConfig.js() function in forks.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d6fb7836_ca18_96d0_38e5_24faf51d9acd["forks../packages/react-client/src/ReactFlightClientConfig.js()"]
  b3630029_765f_b687_a690_e54190fd7201["forks.js"]
  d6fb7836_ca18_96d0_38e5_24faf51d9acd -->|defined in| b3630029_765f_b687_a690_e54190fd7201
  b0dda3d3_1df1_997f_798d_2981e0a2f13e["findNearestExistingForkFile()"]
  d6fb7836_ca18_96d0_38e5_24faf51d9acd -->|calls| b0dda3d3_1df1_997f_798d_2981e0a2f13e
  style d6fb7836_ca18_96d0_38e5_24faf51d9acd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/rollup/forks.js lines 394–436

  './packages/react-client/src/ReactFlightClientConfig.js': (
    bundleType,
    entry,
    dependencies,
    moduleType
  ) => {
    if (dependencies.indexOf('react-client') !== -1) {
      return null;
    }
    if (moduleType !== RENDERER && moduleType !== RECONCILER) {
      return null;
    }
    // eslint-disable-next-line no-for-of-loops/no-for-of-loops
    for (let rendererInfo of inlinedHostConfigs) {
      if (rendererInfo.entryPoints.indexOf(entry) !== -1) {
        if (!rendererInfo.isServerSupported) {
          return null;
        }
        if (rendererInfo.isFlightSupported === false) {
          return new Error(
            `Expected not to use ReactFlightClientConfig with "${entry}" entry point ` +
              'in ./scripts/shared/inlinedHostConfigs.js. Update the renderer config to ' +
              'activate flight suppport and add a matching fork implementation for ReactFlightClientConfig.'
          );
        }
        const foundFork = findNearestExistingForkFile(
          './packages/react-client/src/forks/ReactFlightClientConfig.',
          rendererInfo.shortName,
          '.js'
        );
        if (foundFork) {
          return foundFork;
        }
        // fall through to error
        break;
      }
    }
    throw new Error(
      'Expected ReactFlightClientConfig to always be replaced with a shim, but ' +
        `found no mention of "${entry}" entry point in ./scripts/shared/inlinedHostConfigs.js. ` +
        'Did you mean to add it there to associate it with a specific renderer?'
    );
  },

Domain

Subdomains

Frequently Asked Questions

What does forks../packages/react-client/src/ReactFlightClientConfig.js() do?
forks../packages/react-client/src/ReactFlightClientConfig.js() is a function in the react codebase, defined in scripts/rollup/forks.js.
Where is forks../packages/react-client/src/ReactFlightClientConfig.js() defined?
forks../packages/react-client/src/ReactFlightClientConfig.js() is defined in scripts/rollup/forks.js at line 394.
What does forks../packages/react-client/src/ReactFlightClientConfig.js() call?
forks../packages/react-client/src/ReactFlightClientConfig.js() calls 1 function(s): findNearestExistingForkFile.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free