packageDocumentation module import * as React from "react" ; import { SendContext , StateMachineContext } from "../../components/SendContext" ; /**
 * React props type for the  [[Link]] component.
 */ export interface PropsLink { /** Path or url to link to */ to : string ; /** Object, additional data dispatched with the [[GOTO]] event when the user clicks the link. */ params ? : any ; /** Link text or label */ children : ( renderProps : { onClick : ( ) => void ; } ) => JSX . Element ; } param props const Link = ( props ) => { const context = React . useContext ( SendContext ) ; const onClick = context . send . bind ( null , { type : "GOTO" , route : props . to , ... props . params } , undefined ) ; return props . children ( { onClick } ) ; } ; export default Link ;