That's true, I just feel the example is a bit dangerous. It could be really good advice in one context and really bad in another.
Also sorting a table is rarely more complex than filtering the data by some property, and although I avoid UI libraries, I can't think how one could get in the way.