Yet even before Texas formally rejoined the nation, the U.S. Supreme Court declared that secession was not legal, and thus, even during the rebellion, Texas continued to be a state. In the 1869 case Texas v. White, the Court held that individual states could not unilaterally secede from the Union and that the acts of the insurgent Texas Legislature — even if ratified by a majority of Texans — were "absolutely null."
If there were any doubt remaining after that, late Supreme Court Justice Antonin Scalia set it to rest more than a century later with his response to a letter from a screenwriter in 2006 asking if there is a legal basis for secession.
“The answer is clear,” Scalia wrote. “If there was any constitutional issue resolved by the Civil War, it is that there is no right to secede. (Hence, in the Pledge of Allegiance, 'one Nation, indivisible.')”