main
js 21 lines 606 Bytes
Raw
1 // @enablePreserveExistingMemoizationGuarantees:false @validateExhaustiveMemoizationDependencies:false
2 import {useMemo, useState} from 'react';
3 import {ValidateMemoization} from 'shared-runtime';
4
5 function Component(props) {
6 const [state] = useState(0);
7 // Test for conflicts with `c` import
8 const c = state;
9 const _c = c;
10 const __c = _c;
11 const c1 = __c;
12 const $c = c1;
13 const array = useMemo(() => [$c], [state]);
14 return <ValidateMemoization inputs={[state]} output={array} />;
15 }
16
17 export const FIXTURE_ENTRYPOINT = {
18 fn: Component,
19 params: [{}],
20 sequentialRenders: [{}, {}, {}],
21 };