We are developing a feature where we are going to show the description (lots of text). This description will be related to the page and have some dynamic content. Some of those dynamic content will also have links to other pages.
Since the text will be the same for a particular page on all platforms, we decided to create the text at the server and pass it to the client via store, API response etc. But later we realize an issue in this approach.
For the part where we are creating links, we resort to adding <a> tags in the text itself. This is restrictive to the web and we had several questions on our mind
What if the client is a react page and we need to use <Link> tag?
What if the client is an android/ios app, how will we convey the linkages?
Even for react, we have to use the dangerouslySetInnerHTML attribute(because of the anchor tags) to set the description.
Can there be better way to solve this considering various platform and ways to convey linkage correctly?
question from:
https://stackoverflow.com/questions/65883640/what-are-the-better-ways-to-manage-text-response-with-lots-of-linkages 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…