Skip to content

Commit 2ba29ee

Browse files
committed
Remove unneccessary temporary variable.
1 parent ce10c7c commit 2ba29ee

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/wrapStatelessFunction.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/* eslint-disable react/prop-types */
22

3-
import linkClass from './linkClass';
4-
import React from 'react';
53
import _ from 'lodash';
6-
7-
let wrapStatelessFunction;
4+
import React from 'react';
5+
import linkClass from './linkClass';
86

97
/**
108
* @see https://facebook.github.io/react/blog/2015/09/10/react-v0.14-rc1.html#stateless-function-components
@@ -13,7 +11,7 @@ let wrapStatelessFunction;
1311
* @param {Object} options
1412
* @returns {Function}
1513
*/
16-
wrapStatelessFunction = (Component, defaultStyles, options) => {
14+
export default (Component, defaultStyles, options) => {
1715
let WrappedComponent;
1816

1917
WrappedComponent = (props = {}, ...args) => {
@@ -48,5 +46,3 @@ wrapStatelessFunction = (Component, defaultStyles, options) => {
4846

4947
return WrappedComponent;
5048
};
51-
52-
export default wrapStatelessFunction;

0 commit comments

Comments
 (0)