I’m having a problem with our app where after creating some crucial docs on the backend (not via pub/sub) the Frontend needs to be forced to do a refresh.
How can I achieve this in the template? I’m trying in the onRendered function of that template but Windows.location.reload() is throwing an error:
TypeError: Cannot read property 'reload' of undefined
Use location.reload(); on page load, or if using React router use a Redirect component, if you want to keep it all in React jsx
A simple way would be to just set a variable that gets passed to the client reload = true then have a conditional that checks if(reload) location.reload(); in the markup and badabing you got it
Thank you @truedon - I managed to solve it by adding it to the onDestroyed function. When I put it in the onRendered function the screen constantly flickered as it was called over and over.