mobxjs / mobx-react-lite

Lightweight React bindings for MobX based on React 16.8 and Hooks
https://mobx.js.org/react-integration.html
MIT License
2.13k stars 91 forks source link

Add decorators and options to useLocalStore and useAsObservableSource to make it frinendly to Devtools #283

Closed rainmanhhh closed 4 years ago

rainmanhhh commented 4 years ago

currently all local observables(wrapped by useAsObservableSource or created by useLocalStore) are anonymous please add decorators and options to the function args(just like origin mobx observable) so users can set store name(for debug in Devtools)

danielkcz commented 4 years ago

@rainmanhhh I don't think we are gonna do that, it would only complicate API for a few edge cases. Nobody has asked for it so far. You can easily make your own version of those hooks since they are pretty simple.

I will keep this open for a bit in case more people come up with the same request.

danielkcz commented 4 years ago

Time to close this, apparently nobody else is intrigued by your idea :)