Though Chinese immigrants began to heavily populate the settlement of modern day New York Chinatown around the middle of the 20th century, Chinese immigration to NYC really began around the mid-19th century. These small numbers of Chinese immigrants in the 18th century were mostly seamen and peddlers who moved to NY to find work as traders or sailors.
Eastern cities during the late 19th century were known for their melting-pot nature of communities with dozens of ethnic groups living so close together. Therefore with all citizens speaking a cacophony of languages, wearing peculiar clothes, and many very poor, the Chinese did not stand out. They were no more noticeable, and often had higher incomes than many recent European immigrants. Thus, anti-miscegenation laws were non-existent in places like New York so it was not hard for Chinese men to find white wives, or for white women to consider "Chinamen" as possible husbands.
Soon, in the New York, marriages between Chinese immigrant men and white working class women, though somewhat rare, were far more common than one would expect it to have been. An excess of Irish working class women led to a surprisingly high proportion of intermarriages between Chinese men and Irish women. At the time, in New York there were 75 Chinese men who married, or at least lived with, Irish women between 1820 and 1870-roughly one quarter of the population of Chinese men in that city.
Soon word spread about the Chirish across the nation.
Stereotyping the end of the Chirish
Originally, the Chirish, though at the center of the public's interest, was not shunned because the Irish and the Chinese were thought to be equal. However, through the press, songs, and plays, the Irish began to be viewed as white and the Chinese as yellow-filth.