Description
I realize that once you start patching the internals of a project it's pretty much at your own risk, but in this case I was looking to add a stateTypes
plugin which would act similar to propTypes
/ contextTypes
, where you could have validations built-in for state as they change over time. Our application is using a fully immutable data store and uses a ton of state
to be able to isolate individual units of the root data to prevent unnecessary re-renders when we know exactly where the path has changed.
I was able to get this working pretty quickly, but I'm unable to SpecPolicy.DEFINE_MANY
because the ReactCompositeComponentInterface
is internal.
I could see why exposing this fully might be a bad idea, but I wanted to see if there has been any discussion of allowing consumers to hook into the SpecPolicy
behavior and define their own merge-able types outside of the core.