I believe you are living in Russia now. That’s good example of a country in which the leader uses calls for nationalism and racism to maintain his support. That is one of the most common methods used by all authoritarian dictators. Putin, of course, uses other methods, such as throwing people in jail, or actually killing them for openly opposing him. I am sure that many current elected Republicans are working on ways they will be able to do that too.