-
I'm writing a library for React, which use MobX for state management. For this library, I want to disable strict mode (especially actions enforcing). The only way of doing it I found, is global configuration using function like this: import { configure } from "mobx"
configure({
enforceActions: "never"
}) But in this case, configuration will be applied for entire application that use my library, therefore, a developer of this application, if he also wants use MobX, will be forced to use configuration that I chose (if not, he will retrieve warnings). So my question is, if there is a way to configure MobX in my library, so it will not affect the entire application, where the library is used? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
No there is no way. Best to provide a recommendation to users of your library on how to configure mobx. Do not configure mobx in the library really. Nobody will thank you for that confusion. What is even your reason to disable strict mode? Sounds a bit of a design problem if your library can't handle strict mode well. |
Beta Was this translation helpful? Give feedback.
No there is no way. Best to provide a recommendation to users of your library on how to configure mobx. Do not configure mobx in the library really. Nobody will thank you for that confusion.
What is even your reason to disable strict mode? Sounds a bit of a design problem if your library can't handle strict mode well.