-
-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Hello!,
I'm quite new with hyperHTML, and I cannot wrap my head around conditional rendering of wires just yet.
I have some cases when depending on some application state I do not want to render a specific wire at all, in those cases I'm using a structure like this:
const nestedWire = this.state.showNested ? this.renderNestedWire() : '';
which is giving me headaches when having several nested wires, as sometimes the parent doesn't detect changes.
While trying to recreate the issue i'm having with nested wires I've put up a code example that isn't re-rendering when the reference object is updated, I've followed the debugger and hyperHTML IS detecting changes and returning the correct wired content in the render function. But the bind "isn't picking it up" so the content is not being updated.
To test it just execute showNestedToggle(false)
from the console.
So my questions would be:
- how to handle conditional rendering of wires properly
- what is wrong in this code?
I am afraid I am doing something terribly wrong, I just cannot understand what.