I have an html file and it accepts few query strings
Html file also contains css and script included using script tag
ie we can call this html file as below
external.html?param='something'
i have to use this html in a react component and return as JSX. currently i have done returning as an Iframe as below
const Component = () => {
const iframeUrl = `external.html?param='something'`;
return (
<iframe
{...props}
src={iframeUrl}
/>
)
}
but how can i do without using iframe or iframe with local html(should not download html from server all the time)?
from Add an external html file with query strings in reactjs
No comments:
Post a Comment