Skip to content

Commit 32c64e6

Browse files
author
vvo
committed
fix: do not use memoize & co
Why use memoize here @bobylito? Is this some optimization?
1 parent 318547c commit 32c64e6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

components/templates/Hogan/index.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
var React = require('react');
44

55
var hogan = require('hogan.js');
6-
var memoize = require('lodash/function/memoize');
7-
8-
var memoHogan = memoize(hogan.compile.bind(hogan));
96

107
var HoganResult = React.createClass({
118
propTypes: {
@@ -14,12 +11,12 @@ var HoganResult = React.createClass({
1411
},
1512
componentWillMount: function() {
1613
this.setState({
17-
template: memoHogan(this.props.template)
14+
template: hogan.compile(this.props.template)
1815
});
1916
},
2017
render: function() {
2118
var content = this.state.template.render(this.props.data);
22-
return <div dangerouslySetInnerHTML={{__html: content}} />;
19+
return <div className="hit" dangerouslySetInnerHTML={{__html: content}} />;
2320
}
2421
});
2522

0 commit comments

Comments
 (0)