Design Patterns · Senior · Question 26 of 75

What's the right way to evolve the public API of a shared component library?

Explanation

A breaking change is a major version; before removing an API, mark it deprecated with a warning and instructions. Codemods (like those for Next.js and React) automate migration. This way the library evolves without breaking dozens of apps.

Further reading

Problem with a question

Design Patterns · Senior · question 26

Test yourself

Take the Design Patterns · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz