Skip to content
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

newNode.replaceData is not a function. #102

Open
RickCarlino opened this issue Mar 9, 2017 · 1 comment
Open

newNode.replaceData is not a function. #102

RickCarlino opened this issue Mar 9, 2017 · 1 comment

Comments

@RickCarlino
Copy link

I've been running React Lite in production for a week and just found the following error report:

Uncaught TypeError: r.replaceData is not a function

(Chrome 56, Windows, running react-lite 0.15.33)

After un-minifying the code, I'm pretty sure it would have read:

Uncaught TypeError: newNode.replaceData is not a function

I'm basing that off of this source code here.

Unfortunately, I don't have a whole lot of other information available. Are there any common gotchas that would cause newNode to not have a replaceData function?

Sorry for the lack of info on this one. Please let me know if there is any other information I can provide, and thanks for all the great work on this project.

@Lucifier129
Copy link
Owner

newNode must be a textNode of DOM which has a method named replaceData.

The diff of virtual-dom show that we should update a textNode, but the real-dom is not a textNode.

Append a dom-element which is not created by virtual-dom, or remove a dom-element which is created by virtual-dom, will cause this error. It means that we can't change the status of dom.children for keeping it the same as virtual-dom.

Look out whether there is somewhere mix virtual-dom and real-dom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants