"hasnt taiwan been a part of china for basically all of chinas history before the communist rule? because i really dont know, i think it was but i dunno"Taiwan has been politically connected to China for only brief periods, and only in the recent history. It was occupied exclusively by aboriginal tribes (now only 1% of the population though many others have some degree of such ancestry), more closely related to Filipinos and Polynesians than to Chinese, until the 16th century. China knew of the existence of the island, but took no interest in it until the Portuguese (who called it "Formosa") began to colonize it.
China itself was being invaded from Manchuria at the time; a general Kuo Xing-hua, loyal to the overthrown Ming Dynasty, escaped to Taiwan and conquered it from Portugal (with help from the Dutch). Thus Taiwan served as a refuge for loyalists of the ousted regime, as in the 20th century, until it accepted the overlordship of the Qing (Manchu) emperors in 1685. It was then ruled from Beijing for a century and a half, until in the 1830's the Taiping Rebellion pretty much destroyed the administration in the whole south of China; when it was put down, China did not bother to re-establish control in Taiwan, which became a de facto independent pirate base. Many nations complained to the Chinese about letting Taiwan be a hazardous anarchy, and raided it from time to time; the British established a base at the port of Tainan, and got "treaty rights" there as in Hong Kong, but did not attempt to subdue the whole island.
In the 1880's the emperor finally got around to appointing a governor of Taiwan again, who began a vigorous campaign of industrialization; but then the Japanese fought China, siezed the island, and made the Chinese (in the treaty of Shimonoseki) "renounce all claims to Taiwan forevermore". Taiwan continued as a Japanese province (it still has about 5% Japanese population) until the Americans took it in 1945, and gave it to Chiang Kai-shek, who could not however manage to take control of it until 1947, by which time he was losing control of everything else.