Crank: Component render glitch when reusing elements defined outside of generator loop

Created on 6 May 2021  路  3Comments  路  Source: bikeshaving/crank

Reproduction

If I define some elements outside of my render loop and render them conditionally, Crank does not display them when they're removed and displayed again.

bug

All 3 comments

Ah I see what鈥檚 going on. This is the result of some perhaps overzealous Inferno-inspired optimizations where we use the elements which users create as the actual internal nodes. This would be fine except that we are mutating the retained elements, so when you toggle back to the element which you yourself are retaining, the props have changed to match the other element.

Let me think a little bit about this and make sure it isn鈥檛 affecting performance, but expect a fix by tomorrow.

Hopefully fixed in 0.3.11

Looking good so far, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

malcolmstill picture malcolmstill  路  4Comments

lishine picture lishine  路  7Comments

mcjazzyfunky picture mcjazzyfunky  路  5Comments

lazeebee picture lazeebee  路  5Comments

palavrov picture palavrov  路  6Comments