GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
It's very strange that you have a server environment that defines a fake window global that doesn't behave like a real window. So I don't understand why it should be react-navigation causing the issue (moreover, as you said, it was working before). Swapping out our Syntax Highlighter.

Dimensions.addEventListener is not a function. How does the highlight.js change affect Stack Overflow specifically?

rev 2020.9.24.37673, Stack Overflow works best with JavaScript enabled, Where developers & technologists share private knowledge with coworkers, Programming & related technical career opportunities, Recruit tech talent & build your employer brand, Reach developers & technologists worldwide, In what lifecycle function are you calling, i did this, if (this.domNode != null) { this.domNode.addEventListener('mousedown', this.onDrag); } and i still have the same error, i think cause this.domNode return a react element which not have addeventlistener as a function but i am not sure, If you have the ref on a div the node should be an actual dom node, react: addEventListener is not a function error, https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute, Nvidia has acquired Arm.

privacy statement. Remove double quotes from this, it should be working. Sign in Can I hedge my household expenses using the financial markets? Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below: What is the expected behavior? Making statements based on opinion; back them up with references or personal experience. "What does it sound like" vs "How does it sound like". navigator: {}, window.addEventListener is not a function in node_modules/schedule/cjs/schedule.development.js:366:10. simply use arrow function.this work perfectly. On Sat, Oct 28, 2017 at 10:22 AM Spencer Carli ***@***.

It seems that I lose dispatch in the process. And then bind the function to the constructor.

Why is Olympus Mons the largest volcano in the whole solar system? addEventListener() addEventListener (type, handler); Add a handler to AppState changes by listening to the change event type and providing the handler.

your coworkers to find and share information. site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa. We’ll occasionally send you account related emails.

I've just got this issue since in reinstalled my dependencies, I've just got this issue since in reinstalled my dependencies. So tbh you have no choice but to update to newer versions. Can you post the complete error log? What do I do if I cannot give a good reference to my PhD student?

why this.setState going to “is not a function”?

TODO: now that AppState is a subclass of NativeEventEmitter, we could deprecate addEventListener and removeEventListener and use addListener and listener.remove() directly.

By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.

If you're on 0.42 or below you'll run into issues because Dimensions.addEventListener wasn't added until 0.43. – hans001 Dec 26 '19 at 20:20 addEventListener (type, handler); Add a handler to AppState changes by listening to the change event type and providing the handler TODO: now that AppState is a subclass of NativeEventEmitter, we could deprecate addEventListener and removeEventListener and use addListener and listener.remove() directly. Hmm.

However, if you find that an old, closed issue still persists in the latest version, you should open a new issue. Thanks for contributing an answer to Stack Overflow! Use 15 year old Zippo Lighter Fluid (naphtha).

Replacing date with EPOCH in column output, What's the origin of this quote from Plato? What's the word for asking someone to deliver their promise? Job interview adjustment request was ignored. Thanks for the reply, the function works now but it still dont fix my problem that parallax is stuck. If I understand correctly the callback is failing - though not sure why. "react": "^16.3.2" Error happens when I just import Scroll from 'react-scroll'; Successfully merging a pull request may close this issue. Well. "To suffer the penalty of too much haste, which is too little speed".