Actually I am beginner in React. I have a hosted url. Say for instance("https://ift.tt/2VpK5ly). Actual hosted url which I have used is made with Flutter web technology. I need this to be rendered within my React project. So I have done as below
class WebContent extends React.Component {
constructor(props) {
super(props);
this.state = { height: props.height };
}
componentWillMount() {
this.setState({ height: window.innerHeight - 5 + 'px' });
}
render() {
return (
<object data="https://www.google.com/" width="100%" height={this.state.height}>
</object>
);
}
}
ReactDOM.render(
<WebContent />,
document.getElementById('root')
);
So while running the application, I could able to see the rendered content. Till this no issues.
But when I have hosted my React project in Firebase. I cannot see the rendered content. The page is empty white screen. Title of the tab could be seen but not the content. Am I missing anything or doing any mistake. Any help would be appreciated :(
Aucun commentaire:
Enregistrer un commentaire