Q:

How to prevent components from rendering in Flex

Is there a way to prevent a component from rendering in Flex (to save memory or processing power)?
I tried doing something like:
<components:AddNewItemGroup id="addItemGroup" 
            visible="false"
            enabled="false"
            horizontalCenter="0" bottom="0" />

I noticed that the component gets rendered but it's just not visible or functional.

A:

If you want to prevent a component from being rendered, you need to remove it from the display list using the removeChild method in Actionscript.

