-
Notifications
You must be signed in to change notification settings - Fork 15
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
Is possible to avoid setting a key when static attributes are used? #39
Comments
Sorry it's taken a while to get back to you. There doesn't seem to be a way to avoid setting a key when statics are used. You can force a value for the key to use <div key="foo"><div> Could that help? |
I need the key to be empty (no key). Tried |
I'm not sure I would want to encourage this by having the capabilty to unset a key tbh. Elements with statics but without a key can result in adjacent element getting out of sync and the idom patch doesn't work as expected. I haven't worked with patchOuter much. Maybe I need to look into it first. |
One possibility is not generating statics attributes when My use case is to allow create templates with the root element defined in the template body. This is a requested feature for MarionetteJS . Technically i could implement with |
The use case is:
I must patch an existing element which should be root node of render function
To do this i use
idom.patchOuter
But when a key is used to create this root element idom will create another element discarding the element being patched.
See https://codepen.io/blikblum/pen/GmzVBz (to get the error behavior add a key to root div element)
The text was updated successfully, but these errors were encountered: