in preparation I've started to vet the skills I pick up more carefully. Nowadays, I look at the longevity of the tech. javascript frameworks come and go. those few weeks you invested in learning backbone/jquery are now obsolete. time to learn how to build the wheel again. Beam is a 30 year old tech and elixir looks solid so I'm happy to invest time in it. Flutter is still new and mobile landscape changes constantly so while I think its cool, I leave it to the newer engineers.
Nowadays I'm investing more of my programming related time to systems build on stable platforms. cloud is more or less linux and that doesn't change too much. SQL written today is not going to change much in the next 20 years. Everything added in the last few years seem more or less opt in. Good architecture for backend doesn't change much either.
IF you're in your mid 30's and you wanna stay in the game, I'd recommend doubling down on systems programming (start learning rust NOW if you haven't already) or machine learning with emphasis on theory. The fundamentals and apis don't change radically like frontend does. IOS and Android seems dangerous to me. if I was in my 20's I'd be happy to but I dont' have brainpower to completely relearn from scratch every few years anymore. getting older means using what you have more efficiently.