Prerender components

Hi, I'm working with the AppEmbed component and need guidance on reloading the currently active pageId. I've implemented prerendering following the documentation at https://developers.thoughtspot.com/docs/prerender#_react and based my implementation on the example provided in this CodeSandbox: https://codesandbox.io/p/sandbox/i4g9xi?file=%2Fsrc%2Fcomponents%2Fprerender%2Fprerender.tsx%3A18%2C20 My specific requirement is to reload the current pageId when its corresponding link is clicked. I've noticed this functionality isn't implemented in the referenced TSE example. What would be the recommended approach to implement this? Any guidance would be greatly appreciated.
Prerender components
Prerender components to optimize user experience of your embedding application
5 Replies
shikharTS
shikharTS4w ago
Maybe using the navigate host event can help? https://developers.thoughtspot.com/docs/Enumeration_HostEvent#_navigate. Also do you want to reload the current pageId from within app embed or from outside the app embed? cc @jbc
HostEvent
Event types that can be triggered by the host application to the embedded ThoughtSpot app.
alc-aaron
alc-aaronOP4w ago
I am just wanting to reload the current pageId from outside of the app embed. But can try whichever method works.
shikharTS
shikharTS4w ago
Can you try using navigate host event, the path value can be a number as well..
jbc
jbc4w ago
@alc-aaron Is the pageId already set? You can also just trigger HostEvent.Reload if you just need to to reload the page
alc-aaron
alc-aaronOP4w ago
@jbc Yes the pageId would already be set. Let me try both of these approaches. Thanks for the quick responses! @jbc I was able to achieve this with the HostEvent.Reload. Thank you all!

Did you find this page helpful?