can the state be setup in a let block