1. # Probably what you want.
  2. sub subscribe-deep($store, Str $id, @path, &cb, $widget) {
  3. $store.subscribe-with-callback(
  4. $id,
  5. -> $s { ($s.get-in(|@path) // Any).gist },
  6. &cb,
  7. $widget,
  8. );
  9. }
  10. # Then this on any widget that you want to watch a tree deeply
  11. subscribe-deep($store, 'sub-a', <a>, -> $ { rerender-a() }, $widget);