v0.4.0
Breaking Changes:
- #21 - Default generators now produce values that match their
propName
.
generate({ foo: PropType.string, bar: PropTypes.object })
// Old: => { foo: 'string', bar: {} }
// New: => { foo: 'foo', bar: { bar: 'bar' } }
-
#21 - Generator callbacks now receive
propName
as their first argument, and their definitions' argument as the second. -
#19 -
generateProps.init()
must be called prior to components being imported orgenerateProps()
being called.
Non-breaking Changes:
- #17 - Fixed: Deeply nested props wouldn't respect opts argument.
generate({
foo: PropType.shape({
bar: PropType.shape({
baz: PropType.string
})
})
}, { optional: true })
// Old: => { foo: {} }
// New: => { foo: { bar: { baz: 'baz' } } }