According to
the documentation[
^], the value passed to
render
should be an element, not a string.
const sessionExpiredError = (<div>Your session has expired. Please login again via <a href="https://dev.com/UserTest" target="_blank">admin</a></div>);
const root = ReactDOM.createRoot(document.createElement('root'));
root.render(sessionExpiredError);