Replies: 3 comments 2 replies
-
could you do something like const foo = encodeURI(`
<div>
<div>Come from API 1</div>
<div>Come from API 2</div>
</div>
` and then just use |
Beta Was this translation helpful? Give feedback.
1 reply
-
Something like this? <div className="wrapper"
dangerouslySetInnerHTML={{
__html: `${contentFromYourAPI}`
}}
/>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Yes, I understand. The answer to your question is this: <div className="wrapper"
dangerouslySetInnerHTML={{
__html: `${contentFromYourAPI}`
}}
/> just replace |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We got strange question.
We had Rest API and that gives us HTML content but somehow we need to insert 1 div into the Rest API content.
Example:
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions