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

remove use of innerHTML repalce with createElement? React 15 #42

Closed
himalayafan opened this issue Mar 10, 2016 · 7 comments
Closed

remove use of innerHTML repalce with createElement? React 15 #42

himalayafan opened this issue Mar 10, 2016 · 7 comments

Comments

@himalayafan
Copy link

React 15 removed use of innerHTML and now uses createElement. See latest release notes.

You are still using innerHTML - wich is slow - a lot.

Are you going to fix this?

@Lucifier129
Copy link
Owner

React-lite always use createElement, never use innerHTML to create real dom, but use to clear current childNodes of container dom.

@himalayafan
Copy link
Author

Why not use reacts way to cleanup the children of container dom? Just a simple while loop. Faster too

@Lucifier129
Copy link
Owner

The first, you are wrong about the way react-lite handle vdom to real-dom

The second, you should show me the perf-test to prove what you said, and had better fork react-lite and pull request to me.

Talk is cheap!

@himalayafan
Copy link
Author

@Lucifier129
Copy link
Owner

That is good, hope next time you open issue will show the evidences directly ; )

Will resolve it soon.

@Lucifier129 Lucifier129 reopened this Mar 11, 2016
@himalayafan
Copy link
Author

And next time I hope authors of repos I visit at least have basic knowledge about things

@Lucifier129
Copy link
Owner

Come on, if innerHTML vs removeChild is basic knowledge everyone knows, and why someboy create https://jsperf.com/innerhtml-vs-removechild/394 ?

Additionally, use innerHTML to clear container is not commonly usedery in react-lite, The improve of changing innerHTML to removeChild is very limited .

This issue even not worth mentioning.

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