Files
react/packages/react-reconciler/src/ReactFiberConfigWithNoResources.js
Josh StoryandGitHub b55d319559 Rename HostConfig files to FiberConfig to clarify they are configs fo… (#26592)
part of https://github.com/facebook/react/pull/26571

merging separately to improve tracking of files renames in git

Rename HostConfig files to FiberConfig to clarify they are configs for
Fiber and not Fizz/Flight. This better conforms to the naming used in
Flight and now Fizz of `ReactFlightServerConfig` and `ReactFizzConfig`
2023-04-10 14:58:44 -07:00

39 lines
1.1 KiB
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
// Renderers that don't support hydration
// can re-export everything from this module.
function shim(...args: any): empty {
throw new Error(
'The current renderer does not support Resources. ' +
'This error is likely caused by a bug in React. ' +
'Please file an issue.',
);
}
export type HoistableRoot = mixed;
export type Resource = mixed;
// Resources (when unsupported)
export const supportsResources = false;
export const isHostHoistableType = shim;
export const getHoistableRoot = shim;
export const getResource = shim;
export const acquireResource = shim;
export const releaseResource = shim;
export const hydrateHoistable = shim;
export const mountHoistable = shim;
export const unmountHoistable = shim;
export const createHoistableInstance = shim;
export const prepareToCommitHoistables = shim;
export const mayResourceSuspendCommit = shim;
export const preloadResource = shim;
export const suspendResource = shim;