Releases: collardeau/react-with-state-props
Releases · collardeau/react-with-state-props
Version 2.0.4
- fix inconsistent behavior with derived state where it would trigger unwanted intermediary state renders
Version 2.0.3
- better handling of user mistakes if missing required props or when passing in bad props
Version 2.0.2
- only render user prop when state is loaded
- add proptype validation
Version 2.0.1
- Fix optional types
Version 2.0.0
Move to Typescript!
Simplify/Improve API :)
const propTypes = {
render: PropTypes.func.isRequired,
state: PropTypes.object.isRequired,
withHandlers: PropTypes.objectOf(PropTypes.func),
omitProps: PropTypes.arrayOf(PropTypes.string),
deriveState: PropTypes.arrayOf(
PropTypes.shape({
onStateChange: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.string),
PropTypes.string
]).isRequired,
derive: PropTypes.func.isRequired
})
)
};Version 1.0.0
rename accepted props
Version 0.3.1
Bug fix where props were static in compound handlers (withHandlers)
Version 0.3.0
- add
omitHandlersprop - add
flattenprops
Version 0.2.1
- loaded state set to true on all state changes