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

dep issue #6

Closed
keredson opened this issue Apr 27, 2017 · 2 comments
Closed

dep issue #6

keredson opened this issue Apr 27, 2017 · 2 comments

Comments

@keredson
Copy link
Owner

if you have a file like this:

var WhatEv = React.createClass({
  render: function() {
    return(<Part />);
  },
})
bottlereact._register('WhatEv', WhatEv)

var Part = React.createClass({
  render: function() {
    return(<div>part</div>);
  },
})

BR sometimes can try to render the page before Part has been defined. This is because register can initiate a render if it's the last dependency met.

@keredson
Copy link
Owner Author

keredson commented Apr 27, 2017

to fix this, trigger the render w/ a setTimeout of 0. this will put it next in the queue, rather than before the current file has finished parsing.

keredson pushed a commit that referenced this issue Apr 27, 2017
@keredson
Copy link
Owner Author

fixed in 0.4.3

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

1 participant