Enrich components with getPreviousState method.