main
js 61 lines 2.2 KB
Raw
1 /**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @flow
8 */
9
10 // Renderers that don't support mutation
11 // can re-export everything from this module.
12
13 function shim(...args: any): empty {
14 throw new Error(
15 'This entrypoint of react-noop-renderer does not support mutation. ' +
16 'This error is likely caused by a bug in React. ' +
17 'Please file an issue.',
18 );
19 }
20
21 // Mutation (when unsupported)
22 export const supportsMutation = false;
23 export const cloneMutableInstance = shim;
24 export const cloneMutableTextInstance = shim;
25 export const appendChild = shim;
26 export const appendChildToContainer = shim;
27 export const commitTextUpdate = shim;
28 export const commitMount = shim;
29 export const commitUpdate = shim;
30 export const insertBefore = shim;
31 export const insertInContainerBefore = shim;
32 export const removeChild = shim;
33 export const removeChildFromContainer = shim;
34 export const resetTextContent = shim;
35 export const hideInstance = shim;
36 export const hideTextInstance = shim;
37 export const unhideInstance = shim;
38 export const unhideTextInstance = shim;
39 export const clearContainer = shim;
40 export const applyViewTransitionName = shim;
41 export const restoreViewTransitionName = shim;
42 export const cancelViewTransitionName = shim;
43 export const cancelRootViewTransitionName = shim;
44 export const restoreRootViewTransitionName = shim;
45 export const cloneRootViewTransitionContainer = shim;
46 export const removeRootViewTransitionClone = shim;
47 export type InstanceMeasurement = null;
48 export const measureInstance = shim;
49 export const measureClonedInstance = shim;
50 export const wasInstanceInViewport = shim;
51 export const hasInstanceChanged = shim;
52 export const hasInstanceAffectedParent = shim;
53 export const startViewTransition = shim;
54 export type RunningViewTransition = null;
55 export const startGestureTransition = shim;
56 export const stopViewTransition = shim;
57 export const addViewTransitionFinishedListener = shim;
58 export type ViewTransitionInstance = null | {name: string, ...};
59 export const createViewTransitionInstance = shim;
60 export type GestureTimeline = any;
61 export const getCurrentGestureOffset = shim;