That's a good point. That would be deflating to have a book where the code examples wouldn't work with the latest stable release. I guess this is where a self published ebook would be a better fit (plus automation to make sure that your code samples were up to date with the latest runtime).
I guess it depends on how much the technology evolves too. I think of my own experience in writing a book on cordova. The amount of work to revise it for new editions would be, I estimate, about 50% of the effort of a new book, just because there was significant overlap between the versions.