Whenever I setup react.js and than import any external link (Material UI or Bootstrap React) entire screen get disabled and turned into white? - reactjs

I have setup my react.js eairler, everytime I import bootstrap related thing (Container, Row, Col, etc) and than put it on the application, the screen turns out to be white.
HTML and CSS get to be completely disabled, web page turn into completely white. What do you think the solution for this problem?

Have you followed the setup guide from react-bootstrap?
https://react-bootstrap.github.io/getting-started/introduction
Also, maybe your browser javascript is disabled, try another browser, and when you inspect the page, do you can see the bootstrap elements?

Related

Possible to inject material UI styles into iframe?

I'm using material UI 4.9.x and it doesn't seem possible to use MUI in an iframe with the global styles.
I'm trying to use a React portal to inject the content into the iframe.
THAT part works and my MUI context menu works properly, just has the wrong styles.
I'm trying to inject the styles via CssBaseline but that gets injected into the host window not the iframe window.
I've verified this by looking at the DOM and I can see the elements created there under and not in the iframe.
How would I go about injecting this, completely, into the iframe window.
One idea I had was to change the current / global document and window objects to represent the iframe but worried that might be too hacky.

React Modal Dialog appearing only while inspection

I am new to react and I am using a modal dialog. It is visible when I am inspecting it on browser but not visible generally. What could be the issue?
(Can't paste code since it is work related)
Are you using css z-index at all ? I would use createPortal() approach see the React docs to learn how to do that https://reactjs.org/docs/portals.html

React VR camera straightening control customization

When setting up React VR you get a bundle with already customized full screen button and a button for straightening up camera, which has no name and no customization options:
I have changed the camera rotation principle in client.js and now the button is not working correctly.
How is that button called?
Is there an API for it to customize it?
Is there a way to disable it?
This is kind of a hack but...
That is injected once the app inits and at this time I know of no API to customize it but the good news is it is DOM. You could add some CSS to your page to disable it or restyle it (assuming you have no other SVGs on your page).
svg {
display: none
}

svg sprite load with webpack and react

Hi I am using svg sprite I created using icons8 website for all my website icons, and the icons are working but it seems that the website loads them more than once per page (if i open the network tab i can see it loaded twice or more). I have been looking for a solution for a while now and I cant seem to find the cause of this.
I work with react so I have a component for Icon which uses the tag with xlinkHref attribute.
did anyone encounter such behavior? if yes what would be the best way to approach a solution?

ReactJS project on Android WebView, Image not showing

I am currently experimenting on a hybrid app using ReactJS for my front-end loaded inside an Android WebView. On one of the pages, I have a list that loads an external/hosted image. Tapping on these images routes to another page that shows its description (using react-router. history=hashHistory).
Testing on the browser(chrome), the images appear once loaded. On the other hand, testing on the actual device, the images does not appear. Only when I tap the list item and press back (hashHistory.goBack) that it appears.
I know this is not the best use for ReactJS, but this is better than what we are currently using. Also, our current setup prevents us from pursuing the React Native way. Any ideas?
EDIT:
here's a screen cap:
You need to change your websettings in your code.
WebSettings settings = webView.getSettings();
settings.setDomStorageEnabled(true);

Resources