Trump's success, like Brexit, is about validating people's prejudices and stoking divisions and fears.
Yet again, there are some ridiculous generalisations being made about Brexiters (You voted leave? We haven't met, but you must be xenophobic, stupid, right-wing, old and will die soon, from some laughably backward part of the country, were just making a general protest because you're too thick to understand what you voted for, and you should be patronised and not allowed to vote). It's just bizarre when people are priding themselves on supposedly being less xenophobic than others, yet are quite happy to make insulting generalisations in so many other ways 
Many people voted leave because they would like Britain to be independent again. In 1992 all British citizens were made to take on "European citizenship", and you can't even renounce this without, at the same time, renouncing your British citizenship. Why would a simple trading group need to make people into "citizens" if there were no plans for a federal Europe?
Why would a trading bloc need its own flag, anthem, parliament, flag, motto, materials to promote itself in schools, currency, laws which always supercede those of member states, or to prioritise large corporations who can afford vast amounts on lobbying? Why is there no mechanism for leaving the euro, and why was Article 50 an afterthought only brought in 7 years after John Major signed the Maastricht Treaty?
Many of those who cited immigration as a reason to vote "leave" were not "xenophobic" and would be offended to be wrongly described as such. For most, it was simply about our own government making the decisions, not the EU. Most countries around the world do the same, after all. Regardless of a small minority of extremists or troublemakers, who will always pick out things to hide behind (religion being one example), for most leavers it was definitely not to "validate their prejudices" or "stoke divisions and fears".