Skip to content
Permalink
Browse files

feat: make `onLoad` a required prop for `Experiment` component, add d…

…efault `onLoad` function
  • Loading branch information...
danhayden committed Jul 20, 2017
1 parent a69bb73 commit 833966401e87eb29fa0fd7c77d18d9471a3f6642
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/react-simple-experiment.js
@@ -10,7 +10,11 @@ export class Experiment extends React.Component {
static propTypes = {
name: PropTypes.string.isRequired,
children: PropTypes.array.isRequired,
onLoad: PropTypes.func
onLoad: PropTypes.func.isRequired
}

static defaultProps = {
onLoad: () => {}
}

state = {variant: null}

0 comments on commit 8339664

Please sign in to comment.
You can’t perform that action at this time.