Open frg opened 9 years ago
@frg can you post how you are using the component? Also what version of React?
0.13 ill get you an example of the code later on in the day.
Thanks for helping!
+1
@JoshSGman an example to reproduce this bug would really help!
+1
Same error.
var React = require('react');
var ReactDOM = require('react-dom');
var LazyRender = require('react-lazy-render');
window.onload = function() {
var Main = React.createClass({
render: function() {
var input = ["what", "the", "heck", "there", "I", "don't", "know"]
var children = [];
for (var i = 0; i < input.length; i++) {
// each child must have a consistent height
children.push(
<div style={{ height: 20 }}>
#{input[i]}
</div>
);
}
return <LazyRender maxHeight={300} className="my-list">
{children}
</LazyRender>
}
});
ReactDOM.render(<Main />, document.getElementById('test'));
};
HTML:
<!DOCTYPE html>
<html>
<head>
<script src="output.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="test" style="width:500px;height:500px;background-color:pink;overflow:scroll">
</div>
</body>
</html>
I'm getting this error when trying to implement lazy render. Is anyone able to help me out?
Thanks in advance! -- Jean