Skip to content

Commit f646710

Browse files
committed
linting
1 parent 94f755a commit f646710

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/Memoizer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ const createMemoizer = (memoizationFunction) => {
1818
};
1919

2020
static getDerivedStateFromProps(props, state) {
21-
const { calculateResult } = state;
2221
const { children, compute, pure, ...rest } = props;
2322
const result = state.calculateResult(rest);
24-
if(result !== state.result) {
23+
if (result !== state.result) {
2524
return {
26-
result
25+
result,
2726
};
2827
}
2928
return null;

src/Waterflow.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export class MemoizedFlow extends React.Component {
1313
flow: PropTypes.arrayOf(PropTypes.func).isRequired,
1414
children: PropTypes.func.isRequired,
1515

16-
pure: PropTypes.bool
16+
pure: PropTypes.bool,
17+
};
18+
19+
static defaultProps = {
20+
pure: false,
1721
};
1822

1923
static getDerivedStateFromProps(props, state) {

0 commit comments

Comments
 (0)