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

Key property not exist on virtual dom #155

Closed
chemzqm opened this issue May 18, 2016 · 4 comments
Closed

Key property not exist on virtual dom #155

chemzqm opened this issue May 18, 2016 · 4 comments

Comments

@chemzqm
Copy link

chemzqm commented May 18, 2016

I'm using react component animate to help me add animation to element(s), but I found not like what react did, preact not have key property on the dom:
screen shot 2016-05-18 at 5 00 06 pm
screen shot 2016-05-18 at 5 07 26 pm

As a result, the animation library fails to find the key and throw an error.

It would be nice if we can make key to be a readonly property on the virtual dom by using Object.defindeProperty

@christianvogt
Copy link

Perhaps preact should consider aligning their vdom properties with those of react.

@developit
Copy link
Member

Definitely something to consider. Preact-compat patches VNode to match React, but internally it would make little difference. Might be something I implement as part of cloneElement

@developit
Copy link
Member

I have a confirmed fix for the key property coming shortly.

@developit
Copy link
Member

@chemzqm I've released this under the beta tag: npm i -S preact@beta

marvinhagemeister added a commit that referenced this issue Mar 15, 2022
…rops

Keep state changes during getDerivedStateFromProps
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

3 participants