mobx - Leading decorators must be attached to a class declaration
最新推荐文章于 2024-01-04 19:24:06 发布
在尝试使用MobX库时遇到了一个错误,提示'Leading decorators must be attached to a class declaration'。这通常发生在函数组件之前使用了装饰器,而MobX的装饰器主要用于类组件。解决这个问题需要检查代码,确保装饰器应用在正确的类定义上,而不是函数组件。

7041





