Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LazyRender(...): No render method found on the returned component instance #8

Open
frg opened this issue Oct 21, 2015 · 5 comments
Open

Comments

@frg
Copy link

frg commented Oct 21, 2015

I'm getting this error when trying to implement lazy render. Is anyone able to help me out?

lazy render error

Thanks in advance!
-- Jean

@jkimbo
Copy link
Contributor

jkimbo commented Oct 21, 2015

@frg can you post how you are using the component? Also what version of React?

@frg
Copy link
Author

frg commented Oct 21, 2015

0.13 ill get you an example of the code later on in the day.

Thanks for helping!

@JoshSGman
Copy link

+1

@jkimbo
Copy link
Contributor

jkimbo commented Oct 30, 2015

@JoshSGman an example to reproduce this bug would really help!

@jhusain
Copy link

jhusain commented Nov 30, 2015

+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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants