Skip to content

Commit 478830c

Browse files
committed
feat: add missing proptypes
1 parent a5303ec commit 478830c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/Experiment.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
import React from "react";
2+
import PropTypes from "prop-types";
23
import OptimizeContext from "./OptimizeContext";
34

45
class Experiment extends React.Component {
56
static defaultProps = {
67
loader: null
78
};
89

10+
static propTypes = {
11+
id: PropTypes.string.isRequired,
12+
loader: PropTypes.node,
13+
children: PropTypes.node
14+
};
15+
916
state = {
1017
variant: null
1118
};

src/Variant.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import React from "react";
2+
import PropTypes from "prop-types";
23
import OptimizeContext from "./OptimizeContext";
34

45
class Variant extends React.Component {
6+
static propTypes = {
7+
id: PropTypes.string.isRequired,
8+
children: PropTypes.node
9+
};
10+
511
render() {
612
return (
713
<OptimizeContext.Consumer>

0 commit comments

Comments
 (0)