Declarative Link Handling with Async Parameters

What’s the best practice for using the Link component when a parameter (e.g., sessionId) needs to be fetched via an async call? I know I can use router.navigate() imperatively, but is there a declarative way to handle this scenario?

 <Link
      from={Route.fullPath}
      to={"./$sessionId/selectSystem"}
      params={{ sessionId: someAsyncFunctionCall  }} // <-- i want this to populate onClick.
    >
      Start New Session
    </Link>


Does the onClick event fire before the Link navgiates? If so, I could get the sessionId from the server, then have the link go.

Thanks for your suggestions!
Was this page helpful?