I've been trying to use 'react-native-popup' in my project and rendering the popup gave me the below error in a red screen. If I reload, the message is treated like a warning and the app functions fine, but the error message shows up once in a while. I am wondering what the issue is?
Trying to add a root view with an explicit id already set. React Native uses the id field to track react tags and will overwrite this field. If that is fine, explicitly overwrite the id field to View.NO_ID before calling addMeasuredRootView.
This is how I used it in the render function:
<Popup ref={popup => this.popup = popup }/>
If you are getting something like the screenshot below , Please try reloading the app by tapping the reload button. I was getting this error if I made some changes in code that already had some exception/error. I hope this helps as it has worked for me almost every time.
Related
I have a very simple flatpickr component, without any customizations
When i try to go back it's calling the destroy method for flatpickr, which won't work as there's no such component in the current page.
To reproduce :
Have 2 pages
Create a flatpickr instance. in the 2nd one
go back to the 1st one after visiting the 2nd one
Error being thrown when i try to go back to the previous page
Have attached the pic of error message
To be honest, I don't know what really causes the problem but will try to explain it.
In my react app, I have placed a Google Translate Widget (which is retired some years ago) to easily translate whole website in just a click. It works fine until I am clicking on a MODAL or some button that changes TAB without changing routes. I mean, when routing there is no problem but if new component renders in the same route (like it does in MODAL and TAB component), the app crashes and all I am getting is a blank page.
Images to make it clearer:
As it seems, Google translated page to French in homepage here is a different route and everything seems OK.
BUT when I click on Make a Reservation Button (which is the vertical one) or All Features button (which is the black one at the bottom), distressingly this is what I get:
A blank page. So, without using google-translate-widget all is working without a problem. But if the page is translated and user clicks on a button renders some component on the same route this happens. ANY solution suggestion or comment means so much to me.
Thank you.
I got the component which cause the insertBefore error inside span tag. It solved the issue.
I'm in the process of trying to embed a google sign in button into our project. I have something set up that works for the most part but there's one remaining issue where the button isn't displayed on first render but will show up after the page with that component is refreshed:
https://d.pr/i/AT36oQ
I suspect that something needs to be added to a componentDidUpdate() method in that component but I haven't yet been able to figure out what that is.
Here's a copy of the top level html:
Here's the render method of the component with the g-signin2 element:
I'm trying to add a feature to an existing electron app that uses Angular -- basically I just inject my script once the app is loaded. I want to adding a hotkey to speed up my workflow, the hotkey would virtually click an edit button, append some text to a textarea, and click a save button. The clicks work fine, but the change I make to the text field vanishes when it clicks save, and I gather this is because it's an Angular app and it's not detecting the change to the textarea. I don't speak Angular and I'm a bit baffled trying to understand enough.
I see methods like ChangeDetectorRef.detectChanges which seems relevant but as I'm outside the Angular code I've got no idea how to get a handle to the relevant ChangeDetectorRef to make that call.
I found my own answer...
let el = document.getElementById('foo');
let comp = ng.getContext(el);
comp.$implicit.foo += "\n" + "bar";
When I access the form content that way changes are detected and saved.
I'm using the Polymer core-animated-pages to switch between my websites main pages.
I select which page needs to be shown by the id of that <section>. You can see a sample in action here. Now, the issue I'm having is that at loading of the page, the page that should be selected gets loaded from the url, eg www.example.com/home shows the home page, www.example.com/activities shows the activities page (code left out of example since not really relevant).
But what should I do when the id provided in the link doesn't exist? Is there an option to show a default core-animated-pages-page with a 404 message? Or do I have to check every link if it's in an array of all my pages, if so load the error page manually and else show the correct page?
Again, here's the example: jsbin.
Edit: To show the way my page handles linking, here's an update example: jsbin. Linking is essentially www.example.com/#home, etcetera
Something I'm missing from reviewing your example is how you're handling routing. In a typical site, if a user navigates to example.com/foo or example.com/#foo my expectation would be (using your current setup) that that would take you to the corresponding core-animated-pages page with the ID foo or a section which corresponds to that route.
Using routing (maybe the Polymer flatiron-director element), a basic solution might query the DOM in your element to see if a section of ID notsupportedURL can be found. If not, default to taking the user to your core-animated-pages 404 page, which doesn't have to be any more complex than what you have in place now.
There are a couple of things you could do here.
In the simplest case, you could just validate the value in the pageChanged handler. If the page doesn't exist, update it:
pageChanged: function(){
var foundPage = this.$.pages.querySelector('#' + this.page);
if (! foundPage) {
this.page = 'error'
}
...
See: http://jsbin.com/xequvone/14/edit
If you don't bind the core-menu directly to the core-animated-pages, you can add whatever logic you want. The following version does exactly the same thing as the previous one, but uses a separate variable for the selected page:
http://jsbin.com/xequvone/12/edit
I think you'd want a router if your URL scheme was more complex. For example, if the hash includes multiple levels and parameters, such as #people, #/people/search or #/people/edit/12343.