Spaghetti on the Wall

Buy? Build? Buy-then-rebuild?

I have a recurring problem with frameworks. I pick them up, they speed me up for a while, but then one day I inevitably need to break open the abstraction, and the complexity demons come out.

I see some people still choose frameworks for the speed boost, especially if there's a mature community around it for support.

I see others eschew frameworks and even libraries, preferring the complexities of self-maintenance to the complexities of frameworks.

Is there a third way? Like, I like how Formik introduces itself in documentation by first building up its own abstraction step by step (or... they used to? I can't find that section any more). This really spoke to me because I had recently independently developed a froms framework along the same approach that Formik uses. Doing it and then seeing it independently built and explained gives me a lot more confidence that when I crack this open the complexity demons will be manageable. Using Formik is then no-brainer choice. Of course I should use it, because I understand and agree with the underlying abstractions, but someone else is maintaining the project.

Could I take this approach with all frameworks? When choosing a framework, first crack it open, see if I can understand it, and then rebuild it to solidify understanding? Would that get me the best of both worlds, an understandable framework that someone else maintains?