$$("id") of a subview undefined because not ready

Hello, I have a view that references 2 other view in this way:
MainView:

return {
rows: [
{
// type: “space”,
cols: [
{rows: [ContentView]}, SideView
]
}
]
}

The “ContentView” has an id: id: “contentView”.

If in the init() of the MainView I try to access to $$(“contentView”) i get “undefined”, that’s because the init is not synced with the end of the rendering of the contentView.
In fact if I try to accesso to $$(‘contentView’) after 2 second , I get the correct reference.

init() {
console.log($$(“contentView”)); //undefined

setTimeout(function(){
console.log($$(“contentView”)); // object
},2000);
}

How can I avoid this problem?

thank you

[SOLVED]
ok that’s because the init() function is called at the initialization of the MainView.
I should have referenced the subview in the ready() function.

init() {
console.log($$(“contentView”)); //undefined
}
ready() {
console.log($$(“contentView”)); //object
}

https://docs.webix.com/api__link__ui.proto_ready_config.html
Sorry