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

how to have a VNode force a DOM update (vNode structure is not in sync. with actual DOM) #425

Closed
brucou opened this issue Feb 23, 2017 · 1 comment

Comments

@brucou
Copy link

brucou commented Feb 23, 2017

I encountered a use case where the vTree/vNodes are desynchronized from the actual DOM. This plays badly with the diffing/update mechanism, as from the snabbdom point of view, nothing has changed, while the DOM indeed changed. In this case (which I can detect), I would like to force the DOM to update to reflect the vTree, that is unplug the diffing algorithm for that specific vTree.

Is there an easy way to do this?

I tried using key as in

    ? {
      key : latestTeamIndex,
      props: {
        value: fieldValue,
        type: 'text',
        required: false,
      }
    }

thinking that would be enough for the library to understand that that vNode is different from another vNode with the same data (hence it should update the DOM instead of doing nothing) but that seems to fail.

@brucou
Copy link
Author

brucou commented Jun 25, 2019

that looks seriously unmaintained so I have stopped using it, so I am closing this

@brucou brucou closed this as completed Jun 25, 2019
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

1 participant