Closed troutowicz closed 9 years ago
Why not both? That way it's just a minor version bump instead of a breaking change.
Yeah that's a better idea. :)
:+1: for that!
Why not add .compose()
and initializers
seeing as how we need to get moving toward the open Stamp specification anyway?
IMO, the best thing about the stamp specification is that all the stampit idioms will still work, and we get full control of the stamp API so that it's a breeze to offer the React-specific stuff.
Also, :+1: for doing both, not stripping state
.
It has been mentioned a few times now how an
init
method prop in the description object would be useful. See issues #21, #29. What if the API was changed, removing thestate
prop of the description object and in it's place have more flexibleinit
method prop?init
would behave just asinit
behaves in the core stampit library, so component state would be set like:instead of
This is more typing for declaring component state, but the
init
method would allow a wide range of use cases currently not possible. It also makes sense to have a constructor like method at the stamp level (init
) as well as the React level (componentWillMount
).