This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-21
lines changed Expand file tree Collapse file tree 2 files changed +14
-21
lines changed Original file line number Diff line number Diff line change 5
5
raise [
6
6
"No React.js Available" ,
7
7
"" ,
8
- "React.js must be defined before requiring 'reactive-ruby'" ,
9
- "'reactive-ruby' has been tested with react v13, v14, and v15." ,
8
+ "A global `React` must be defined before requiring 'reactive-ruby'" ,
10
9
"" ,
11
- "IF USING 'react-rails': " ,
12
- " add 'require \" react\" ' immediately before the 'require \" reactive-ruby\" directive in 'views/components.rb' ." ,
10
+ "To USE THE BUILT-IN SOURCE: " ,
11
+ " add 'require \" react/react-source \" ' immediately before the 'require \" reactive-ruby\" directive." ,
13
12
"IF USING WEBPACK:" ,
14
- " add 'react' to your webpack manifest." ,
15
- "OTHERWISE TO GET THE LATEST TESTED VERSION" ,
16
- " add 'require \" react-latest\" ' immediately before the require of 'reactive-ruby'," ,
17
- "OR TO USE A SPECIFIC VERSION" ,
18
- " add 'require \" react-v1x\" ' immediately before the require of 'reactive-ruby'."
13
+ " add 'react' to your webpack manifest."
19
14
] . join ( "\n " )
20
15
end
21
16
require 'react/top_level'
Original file line number Diff line number Diff line change 2
2
3
3
if RUBY_ENGINE == 'opal'
4
4
if `window.React === undefined || window.React.version === undefined`
5
- raise "No React.js Available\n \n " \
6
- "React.js must be defined before requiring 'reactrb'\n " \
7
- "'reactrb' has been tested with react v13, v14, and v15.\n \n " \
8
- "IF USING 'react-rails':\n " \
9
- " add 'require \" react\" ' immediately before the 'require \" reactive-ruby\" " \
10
- "directive in 'views/components.rb'.\n " \
11
- "IF USING WEBPACK:\n " \
12
- " add 'react' to your webpack manifest.\n " \
13
- "OTHERWISE TO GET THE LATEST TESTED VERSION\n " \
14
- " add 'require \" react-latest\" ' immediately before the require of 'reactrb',\n " \
15
- "OR TO USE A SPECIFIC VERSION\n " \
16
- " add 'require \" react-v1x\" ' immediately before the require of 'reactrb'."
5
+ raise [
6
+ "No React.js Available" ,
7
+ "" ,
8
+ "A global `React` must be defined before requiring 'reactrb'" ,
9
+ "" ,
10
+ "To USE THE BUILT-IN SOURCE: " ,
11
+ " add 'require \" react/react-source\" ' immediately before the 'require \" reactrb\" directive." ,
12
+ "IF USING WEBPACK:" ,
13
+ " add 'react' to your webpack manifest."
14
+ ] . join ( "\n " )
17
15
end
18
16
require 'react/hash'
19
17
require 'react/top_level'
You can’t perform that action at this time.
0 commit comments