我在 React js 應用程序中創建了一個組件,它使用 fetch 調用 api 并獲取一些 json 數據,如下所示。我怎樣才能在我自己的html代碼中按原樣顯示json數據中的html? data = { duration : "1", html : "<div><p>some message here</p><p> more text here <span> styled text <span><p></div>" }
如何在我的 React js 頁面中顯示來自 json 數據的 html 代碼?
哆啦的時光機
2023-12-14 15:32:20