Skip to content

Allow to pass DOM object as parent selector (second PR) #358

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

Merged
merged 3 commits into from
Sep 28, 2015

Conversation

ximus
Copy link
Contributor

@ximus ximus commented Sep 27, 2015

Extend possibility of findDOMNodes and as a consequence mountComponents. It allows to use it with an element which was inserted to the DOM tree without react.js. Example:

$(document).on('nested:fieldAdded', function(e) {
  window.ReactRailsUJS.mountComponents(e.target);
});

Follow up from #340

aratak and others added 3 commits September 20, 2015 22:28
Extend possibility of `findDOMNodes` and as a consequence `mountComponents`. It allows to use it with an element which was inserted to the DOM tree without react.js. Example:

```
$(document).on('nested:fieldAdded', function(e) {
  window.ReactRailsUJS.mountComponents(e.target);
});
```

With backward compatibility, of course.
@rmosolgo
Copy link
Member

👍 Thanks for getting this in shape!

I guess it would misbehave if someone did this:

stringObject = new String("myString")
typeof stringObject // "object"

But, every JS guide I've ever seen just says "don't use new String", so I don't think we should worry about it!

rmosolgo pushed a commit that referenced this pull request Sep 28, 2015
Allow to pass DOM object as parent selector (second PR)
@rmosolgo rmosolgo merged commit e33954c into reactjs:master Sep 28, 2015
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

Successfully merging this pull request may close these issues.

4 participants