Yes, if you learned React you'd have a decent shelf life still.
What if you learned classic AngularJS, due to go unsupported in a month and a half? What if you threw in with ExtJS ages ago and the enterprise corp you've been using it for just downsized and outsourced your project? Maybe you were an EmberJS aficionado but can't find new gigs using it. I worked on a greenfield project in Backbone/Thorax/Mustache a number of years back but haven't seen any of those in the wild since. Maybe you love Elm but can't find any places that will hire you to use it. Ditto using Clojure on the frontend.
Picking the winner is a great trick, but my point was that if you didn't (or just the companies you worked for didn't), you may find yourself in a bit of a hole, specifically if you have a lot of other responsibilities in your life.