I don’t think it’s racism. Many of the voters who voted for Trump had voted for Obama in the previous cycle. This is especially pertinent in the swing states.
If we chalk up everything to racism, then we misunderstand the problem. And then people will wonder why Trump won again in 2020.