The USA didn't invade Texas.
Texians (Anglo Texans who had migrated) and Tejanos (Mexican Texans) alike were fed up with Santa Anna's rule and successfully rebelled, forming the Republic of Texas which lasted for 10 years, at which point the Republic accepted the American offer of annexation in a referendum. The Mexican/American war spun out of the aftermath of the annexation.