I have a bunch of html content in a database which includes many embedded local links.
I need to render this content using react. However I also want to convert any local links to react-router <Link>
tags.
I could use dangerouslySetInnerHTML. However I am unsure how best to convert the links.
I've also found a few packages such as htmltojsx。但是我不确定使用这些软件包转换链接的最佳方法。
这一定是一个相当普遍的问题,通常如何解决?