This is usually true of language or framework-specific books, but not of more general books like The Pragmatic Programmer.
If you're looking to write books that will be read years from now, you need to focus on wider or more fundamental issues. The caveat here is that primers for long-lived languages like C++ have remained relevant for decades.