Even if you earned $0 from your book, I'd say being able to tell people you wrote a book at interviews and on your resume, and even at parties, would make it worth it.
And you'd be able to call yourself an author, how cool is that?
Surely that doesn't work if it's 'just' some self-published book the interviewers haven't heard of?
I don't mean any disrespect to yours at all (since I've never read any book on React, so I can say with certainty not your (unshared name) book on React) but anyone can write a bad book and start selling (or rather, 'offering for sale') PDFs/ePubs on their website (I've thought about doing it!) that shouldn't make them an automatic authority on the titular topic though.
I don't disagree in that a publisher provides some quality floor and they presumably wouldn't have taken your book on if they already have a superior library on the same topic.
That said, put a self-published book on your site and someone can tell pretty quickly from a few minutes with the PDF if it's obviously bad. (Honestly, if I'm doing a book primarily for reputational purposes and I self-publish, I will (and have) just given it away for free.
I'm not really asking for any info, I'm assuming that if that's really worked as described for k___, then their book is well known or regarded in React circles, and that's why.
I don't think that's a good reason to do it, because well-regarded authors didn't become so by writing any old book - they either already were, or they wrote a bloody good one.
And you'd be able to call yourself an author, how cool is that?