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

nodes are replaced when there are no changes #1426

Closed
iambumblehead opened this issue Dec 11, 2018 · 2 comments
Closed

nodes are replaced when there are no changes #1426

iambumblehead opened this issue Dec 11, 2018 · 2 comments
Labels

Comments

@iambumblehead
Copy link
Contributor

iambumblehead commented Dec 11, 2018

In this example, the latest version of inferno 7.0.2 replaces the entire node hierarchy on each render call. I updated from inferno 5.0.3 where only changed nodes were replaced.

const inferno = require('inferno'),
      infhydrate = require('inferno-hydrate'),
      { h } = require('inferno-hyperscript'),
      root = document.body.firstElementChild;

root.innerHTML = '<div><span>do not replace me</span></div>';

setTimeout(() => {
  let vtree = h('div', [h('span', 'do not replace me')]);
      
  infhydrate.hydrate(vtree, root);
  inferno.render(vtree, root);
}, 10000);

setTimeout(() => {
  let vtree = h('div', [h('span', 'do not replace me')]);
      
  inferno.render(vtree, root);      
}, 20000);

am I doing something wrong?

@Havunen
Copy link
Member

Havunen commented Dec 13, 2018

Hi @iambumblehead this sounds like a bug. I will look into it tonight. Thanks for reporting it.

@Havunen
Copy link
Member

Havunen commented Dec 13, 2018

Fixed and released in 7.0.4!

@Havunen Havunen closed this as completed Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants