# If.bind + slot caching problem

**URL:** https://discourse.aurelia.io/t/if-bind-slot-caching-problem/4564
**Category:** Uncategorized
**Created:** [January 20, 2022, 1:02pm UTC](https://discourse.aurelia.io/t/if-bind-slot-caching-problem/4564 "2022-01-20T13:02:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![elitastic](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/elitastic/32/1787_2.png) [@elitastic](https://discourse.aurelia.io/u/elitastic)
#### Post date: [January 20, 2022, 1:02pm UTC](https://discourse.aurelia.io/t/if-bind-slot-caching-problem/4564/1 "2022-01-20T13:02:12Z")

</div>

There seems to be a problem when using if.bind in the context of multi-level “slots”.

I have created a gist to demonstrate the problem:

[https://gist.dumber.app/?gist=b4a4c78f3494f833a473d272faaaace4](https://gist.dumber.app/?gist=b4a4c78f3494f833a473d272faaaace4)

It can be fixed when disabling the cache of the “if.bind” attribute. This is a possible workaround, but not the solution. Does anyone know how this can be solved more robustly and elegantly?

Thanks for any help.

---

<div class="post-metadata">

### Author: ![MylesPenlington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/mylespenlington/32/1978_2.png) [@MylesPenlington](https://discourse.aurelia.io/u/MylesPenlington)
#### Post date: [January 25, 2022, 2:54am UTC](https://discourse.aurelia.io/t/if-bind-slot-caching-problem/4564/2 "2022-01-25T02:54:44Z")

</div>

I think this is a case where you should use “show.bind” instead. When using “if.bind”, if false, then the component and any children will be excluded. Sounds like you expect it to appear when you toggle the boolean value, so using show.bind show give the desired behaviour.
