initialize component in attach()
documentation