const FooContext = React.createContext({current: null}); function Component(props) { const foo = React.useContext(FooContext); const ref = React.useRef(); const [x, setX] = React.useState(false); const onClick = () => { setX(true); ref.current = true; }; return
{React.cloneElement(props.children)}
; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{children:
Hello
}], };