Closed josephfinlayson closed 9 years ago
There is an undocumented feature to do this here
Well, it is documented... that function is the decorator function. It just so happens that it can also work as a regular function. So I guess in that sense it is undocumented. :)
Sorry about that, didn't see it. Yeah class decorators are just functions and can be used as such.
I don't consider it undocumented either, but it's buried under advanced use cases. While I think it is better for new react-stampit people to think in the paradigm covered in the main readme, perhaps the "shortcut" decorator option should be at least mentioned there as well.
It might also be beneficial to document in the advanced use cases the plain function usage since decorators are not in wide use yet (babel still has them at stage 1).
I'd gladly accept a PR with those changes!
Closing, @josephfinlayson reopen if you still have questions.
Is something like this possible? I'd like to convert my classes to stamps centrally without using decorators.