Anyone truly interested in looking at how the rise of Trump happened should read through this. Absolutely fascinating. Various right and left think tanks pooled resources to follow voters through multiple elections to see what motivates change in voters. Broken down this way you get a sense of what was the difference between 2012 and 2016.
Some takeaways for me:
1. The vast majority of voters were motivated by party lines. Not really surprising, but 90% of all voters voted the same party in both elections. It really reinforces the fact that a limited few really decide the vote.
2. White people who voted for Obama then Trump were strongly correlated with negative views on Muslims and had the opinion that Black people could and should move up in society without special favours. Basically, it wasn't the economy. It was subtle xenophobia.
3. A large portion of Trump's base (non traditional Republican small government) has very liberal views on entitlements. This leads to some thought provoking contrasts with the majority of republican objectives.
No single thing led to Trump's win. You could point to economic hardship with white rural voters, Bernie holdouts, disenfranchised black voters, white working class turnout, Comey letter, etc.
All of those are true and the correct answer depends on how you phrase the question and your nuanced perspective.
What is the biggest reason Clinton lost? Here's my opinion based on work done by fivethirtyeight, this study and own observation (not really strong as far removed from the US as I am)
-biggest event was the Comey letter. There's no disputing that her support levels were high enough to win relatively comfortably until the letter dropped and her support plummeted
-biggest driver of white working class voters switching from Democratic nominee to Trump was fear of immigrants. Trump's gamble (I think he was lucky here not prescient) paid off because his blatant race baiting was enough to switch the few targets, while the vast majority of the Republicans were abhorred, they were not about to change party lines.
https://www.voterstudygroup.org/reports/2016-elections