In 1821, after Mexico's War of Independence from Spain, Texas was part of the United Mexican States as the state of Coahuila y Tejas. When did the republic dissolve and Texas entered the US