-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'nodeType' of null #43
Comments
I'm sitting with the same issue.. did you manage to fix it? |
I am also having the same issues I do not have styled-components so it should not be related to that |
I haven't managed to solve this yet unfortunately. Any feedback would be appreciated! |
Also experiencing this issue, have a functional component that gets re-rendered by a parent class component according to some state changes, which also updates a call to apollo/graphql (not sure if this is potentially a pitfall). Without anime wrappers, the component works as expected, but with them I now get the "Cannot read property 'nodeType' of null" error. I suspect this falls somewhere on the component rendering in the lifecycle before Anime is ready, but not sure how to test this yet. I understood you guys had done some work on lifecycle methods for Anime mounting/unmounting, but haven't found it in the documentation. I am going to dig into the typescript files and see what I can find, but would appreciate any guidance if anyone has any. I realize the devs are busy with other projects, but just hoping anyone has any insight. |
Have you guys tried not using the try:
|
Did you try to give ex) If you pass down
|
Also encountering this error with |
I'm also facing the same issue with "react": "16.0" in jest snapshot testing. |
The same one |
@manakuro thx, it helped to me strangly |
The @manakuro advice do the trick for me, I'm using this library with Gatsby |
It seems to be a unique |
this is the answer |
Just adding on to this, it will happen even if your Example:
|
Using Date.now() works, but it's a terrible solution. The component is re-rendered on every update, making the lifecycles begin and complete unuseable. |
if you use Date.now() or combine anything with Date.now() at key={} attribute. |
The error means that the targets passed in is null. In my case, I was passing target using React ref.current which could be null across renders. Simply applying a null check on it solved it. |
Hi there,
Trying to use React Anime in my project, and I keep getting the above error!
node v9.8.0
react v16.2.0
Snippet of my code:
Where
show
is a bool being passed from the parent component. I am also usingstyled-components
throughout the app if that makes any difference?The error seems to be in the actual
anime.min.js
file inside node_modules - not insidereact-anime
itself, but there is nothing there on the issue either. Anyone had this before and manage to solve it?The text was updated successfully, but these errors were encountered: