Actually send the state to the ui