add constructor config method for component factory