Design Patterns · Senior · Question 45 of 75
What does a Facade over a third-party UI library (e.g. your own <Button> on top of MUI) give you?
- ✓Correct answer: Your own stable API and replacing the library in one place
- 2The wrappers make the library's components faster
- 3It's required by the licenses of most UI libraries
Explanation
The app uses only your components with the variants you need, and the library details are hidden. A major version upgrade or migration affects only the wrapper layer. The downside is maintaining the wrappers and not leaking the library's whole API through.