|
1
|
import {useEffect} from 'react'; |
|
2
|
|
|
3
|
function Foo(props, ref) { |
|
4
|
useEffect(() => { |
|
5
|
ref.current = 2; |
|
6
|
}, []); |
|
7
|
return <div>{props.bar}</div>; |
|
8
|
} |
|
9
|
|
|
10
|
export const FIXTURE_ENTRYPOINT = { |
|
11
|
fn: Foo, |
|
12
|
params: [{bar: 'foo'}, {ref: {current: 1}}], |
|
13
|
isComponent: true, |
|
14
|
}; |