Wanting to have the last word, to write your own history or to speak at your own wake, is a natural human impulse. Former American presidents are afforded that licence, and more besides.
Trump will not be the first (in the event he reaches the White House and he delivers on his campaign promises) president to enact racist laws that place restrictions on immigrants of specific ethnic groups during his reign.
Obama may never enter the pantheon of great presidents, in the sense that he notched up any one historic achievement or changed his country in any single specific way. What he has done, however, is to prepare the way for vast changes in how the United States sees itself, and how it is regarded around the world.