each component now sync state with db