uniforms
uniforms copied to clipboard
Consider removing `props` from `Bridge.getInitialValue`
As described in https://github.com/vazco/uniforms/issues/998#issuecomment-938594418, passing props to Bridge.getInitialValue was not well-thought:
[...] It'd be enough to memoize this
getInitialValuecall. The problem is that we cannot do that, as it receivespropsthat may include arbitrary complex structures. Why? you may ask. And that's a very good question! Only to implement theinitialCountprop forListField(JSON schema, SimpleSchema).
As this is the only usage of it within the core themes and we haven't seen any "in the wild", we decided to deprecate this feature and remove it in v4. This issue is a place to raise concerns, questions, or alternative proposals.
(We've had a team discussion about this issue, and here are the notes.)
We've decided to remove it in v4.
We've revisited this issue and confirmed our decision of the removal of props in Bridge.getInitialValue. This will lead to the deletion of the initialCount prop as its usage is not intuitive and can be worked around. To migrate, one should start using defaultValue instead.