Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit bda67e8

Browse files
committed
wip
1 parent 30e14c7 commit bda67e8

File tree

6 files changed

+41948
-4
lines changed

6 files changed

+41948
-4
lines changed

lib/react/component/api.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ module React
22
module Component
33
module API
44
def dom_node
5-
if `typeof React.findDOMNode === 'undefined'`
6-
`#{self}.native.getDOMNode` # v0.12.0
7-
else
5+
if !(`typeof ReactDOM === 'undefined' || typeof ReactDOM.findDOMNode === 'undefined'`)
6+
`ReactDOM.findDOMNode(#{self}.native)` # v0.14.0
7+
elsif !(`typeof React.findDOMNode === 'undefined'`)
88
`React.findDOMNode(#{self}.native)` # v0.13.0
9+
else
10+
`#{self}.native.getDOMNode` # v0.12.0
911
end
1012
end
1113

lib/reactive-ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if RUBY_ENGINE == 'opal'
2-
#require 'sources/react.js' unless defined? NOREACTJS
2+
#require 'sources/react_v15.js' comment this out for release, leave in for testing with which ever version you like
33
require 'react/top_level'
44
require 'react/observable'
55
require 'react/component'
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)