You might argue that the racist appeals were more effective because an African American Democrat had been in office. Keep in mind that the racist attacks didn't begin with Trump, although he certainly joined in enthusiastically.... and while his focus in the campaign was mostly on Latinos and Muslims, he took shots at the AA community as well (cities as war zones, etc.).... and he never did honestly abandon the racist attacks on Obama's origins/citizenship, etc. (No, a grudging non-apology statement, more or less at the point of a gun, does not count.)
Regarding the "economic anxiety" trope, it will be interesting to see the extent to which "white working-class voters" step up to fill the jobs that will suddenly become vacant because of ICE's efforts to remove and keep out undocumented Latino workers; e.g., menial jobs in the hospitality/tourism industry, landscaping, lawn services, house cleaning. and (hugely) migrant agricultural work. Maybe "middle America" will surprise me - but I rather expect them to sit in their rural enclaves and carp and moan about higher prices, lack of available services, etc.
More generally - even if some Trump supporters were more motivated by his (absurd, empty) promises to somehow restore mining and manufacturing jobs than by his racism, the fact remains that, to those people, his overt racism (and misogyny, narcissism, and general ignorance) were not deal-breakers. If somebody isn't willing to burn a cross on the lawn of the local black family, but really doesn't give a darn if the local KKK does that (or perhaps is only OK if the local KKK buys their kerosene from him), is that person a racist - or not?
People who look the other way in the face of evil are complicit.