UPDATE: I had come up with the iframe
approach to load a website within the component. However, all the websites with authentication pages like google, facebook will block framing.
You need to use iframe
within your Component That you wanted to link to.
const MyWebSite = ({siteName})=>{
return(
<iframe src={siteName} title="My Site Name">
</iframe>
)
}
Then from Parent Component Use this Component.
<MyWebsite siteName="https://aperfectplate.co/" />
Update: While the above website will work and food app is loaded.
Codesandbox: https://codesandbox.io/s/iframe-example-nihyh?file=/src/App.js
But authentication websites will not be loaded within the component with the above approach. For example if you try below code. It wouldn't load google.com.
<MyWebsite siteName="https://www.google.com/" />
That's what I feel can be done. You may improve it later using React Router. You can make it behave like a link also. This idea could be used to build on top of :)