I've been a software dev for 15~ years professionally and over the course of my career have moved from front end to full stack and back to front end depending on the project. I make multiple 6 figures and by all accounts could be considered "successful".
My most recent gig after working for years in React and Angular I've had to move to a new framework (Vue) due to project requirements that I did not write. As a senior contributor I'm expected to handle the complex stuff but after five months on the project I feel fatigued - like I just don't care enough to work on this project. I don't know if it's JS framework fatigue or the project itself or even depression. But I feel like after 15 years of doing this I'm getting "dumber" to the point where I question the most basic things in coding. It's rather discouraging.
My boss is pretty cool and has kept an open door to let them know if I want to switch projects but I'm worried (without evidence) that if I say anything I'll be put on something even "harder" when I can't bring myself to write some simple JS these days.
Anyone ever experience this? I'm in my mid 30s.
The key to not having to deal with this problem anymore, for me, was starting to proactively switch things around to break the routine of consecutive work-weeks. One of my tricks was to do some kind of mini-vacation every 6-8 weeks, go somewhere new, leave work behind for 3-4 days. Even smaller things like regular social events can work wonders - anything that breaks the weekly routine.
Back when I'd get myself into burnout periods the most effective way to recover enthusiasm was to pick up a new skill, work-related or not. I was in my mid-30s in the late aughts and not entirely sure I wanted to keep coding - so I signed myself up for an 18 month "executive MBA" program to find out if I might want to do something else, and instead came out of that with a whole new outlook on how and why to write code.
Then around 5 years later I started writing code on the side, for myself, to gradually improve over the long term, and this can be absolutely therapeutic.
Try to switch things around a little bit, do something new, see if that helps?