I'm trying to turn render some HTML for an email using ReactDOMServer.renderToString and for the life of me I can't figure out how to get the paths in a <Link /> to resolve to absolute URLs.
const html = ReactDOMServer.renderToString(
<StaticRouter location="http://www.test.com" context={context}>
<Provider store={store}>{content}</Provider>
</StaticRouter>,
);
I would assume that if in my <App> I had a <Link to="/path/xyz" /> that that would result in: <a href="http://www.test.com/path/xy">, but it's not.
Thoughts?