add component state class auto update