| 1 | // @enablePreserveExistingMemoizationGuarantees |
| 2 | import {useCallback} from 'react'; |
| 3 | import {identity, makeObject_Primitives, mutate, useHook} from 'shared-runtime'; |
| 4 | |
| 5 | function Component(props) { |
| 6 | const free = makeObject_Primitives(); |
| 7 | const free2 = makeObject_Primitives(); |
| 8 | const part = free2.part; |
| 9 | useHook(); |
| 10 | const callback = useCallback(() => { |
| 11 | const x = makeObject_Primitives(); |
| 12 | x.value = props.value; |
| 13 | mutate(x, free, part); |
| 14 | }, [props.value, free, part]); |
| 15 | mutate(free, part); |
| 16 | return callback; |
| 17 | } |
| 18 | |
| 19 | export const FIXTURE_ENTRYPOINT = { |
| 20 | fn: Component, |
| 21 | params: [{value: 42}], |
| 22 | }; |