>Having 10kb tooltip library for doing this automatically is a bit of an overkill for me
Of course, but I hardly see how that's comparable to writing a React class "ToolTip" which is smart enough to know where the side of the screen is, and comes with the ability to use JS.