File tree 13 files changed +29
-46
lines changed
13 files changed +29
-46
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ import HelpButton from '../HelpButton';
5
5
6
6
export default ( ) =>
7
7
< div className = "container" >
8
- < Title />
9
- < HelpButton />
8
+ < Title />
9
+ < HelpButton />
10
10
</ div > ;
Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ import HelpButton from '../HelpButton';
8
8
9
9
export default ( ) =>
10
10
< View style = { styles . container } >
11
- < Title />
12
- < HelpButton />
11
+ < Title />
12
+ < HelpButton />
13
13
</ View > ;
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
1
import AppView from './AppView' ;
3
-
4
- export default ( ) => < AppView /> ;
2
+ export default AppView ;
Original file line number Diff line number Diff line change @@ -3,9 +3,11 @@ import HelpButtonView from './HelpButtonView';
3
3
4
4
export default class AbstractHelpButtonContainer extends React . Component {
5
5
constructor ( props ) {
6
- if ( new . target === AbstractHelpButtonContainer ) {
7
- throw new TypeError ( 'Cannot construct AbstractHelpButtonContainer instances directly' ) ;
8
- }
6
+ // new.target is not working on Android
7
+ // if (new.target === AbstractHelpButtonContainer) {
8
+ // throw new TypeError('Cannot construct AbstractHelpButtonContainer instances directly');
9
+ // }
10
+
9
11
super ( props ) ;
10
12
11
13
this . onClick = this . onClick . bind ( this ) ;
@@ -16,8 +18,6 @@ export default class AbstractHelpButtonContainer extends React.Component {
16
18
}
17
19
18
20
render ( ) {
19
- return (
20
- < HelpButtonView onClick = { this . onClick } />
21
- ) ;
21
+ return < HelpButtonView onClick = { this . onClick } /> ;
22
22
}
23
23
}
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
3
3
export default props =>
4
- < button className = "help-button" onClick = { props . onClick } > Help</ button > ;
4
+ < button className = "help-button" onClick = { props . onClick } >
5
+ Help
6
+ </ button > ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import { Alert } from 'react-native' ;
3
2
import Button from 'react-native-button' ;
4
3
5
4
import styles from '../../native/styles' ;
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
1
import HelpButtonContainer from './HelpButtonContainer' ;
3
-
4
- export default ( ) => < HelpButtonContainer /> ;
2
+ export default HelpButtonContainer ;
Original file line number Diff line number Diff line change @@ -4,4 +4,6 @@ import { Text } from 'react-native';
4
4
import styles from '../../native/styles' ;
5
5
6
6
export default ( ) =>
7
- < Text style = { styles . title } > React Native Code Reuse (Android)</ Text > ;
7
+ < Text style = { styles . title } >
8
+ React Native Code Reuse (Android)
9
+ </ Text > ;
Original file line number Diff line number Diff line change @@ -4,4 +4,6 @@ import { Text } from 'react-native';
4
4
import styles from '../../native/styles' ;
5
5
6
6
export default ( ) =>
7
- < Text style = { styles . title } > React Native Code Reuse (iOS)</ Text > ;
7
+ < Text style = { styles . title } >
8
+ React Native Code Reuse (iOS)
9
+ </ Text > ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
3
3
export default ( ) =>
4
- < h1 className = "title" > React Native Code Reuse (Web)</ h1 > ;
4
+ < h1 className = "title" >
5
+ React Native Code Reuse (Web)
6
+ </ h1 > ;
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
1
import TitleView from './TitleView' ;
3
-
4
- export default ( ) => < TitleView /> ;
2
+ export default TitleView ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import { AppRegistry } from 'react-native' ;
2
+ import { AppRegistry } from 'react-native' ;
3
3
4
4
import App from './app/components/App' ;
5
-
6
- export default class ReactNativeCodeReuse extends React . Component {
7
- render ( ) {
8
- return (
9
- < App />
10
- ) ;
11
- }
12
- }
13
-
14
- AppRegistry . registerComponent ( 'ReactNativeCodeReuse' , ( ) => ReactNativeCodeReuse ) ;
5
+ AppRegistry . registerComponent ( 'ReactNativeCodeReuse' , ( ) => App ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import { AppRegistry } from 'react-native' ;
2
+ import { AppRegistry } from 'react-native' ;
3
3
4
4
import App from './app/components/App' ;
5
-
6
- export default class ReactNativeCodeReuse extends React . Component {
7
- render ( ) {
8
- return (
9
- < App />
10
- ) ;
11
- }
12
- }
13
-
14
- AppRegistry . registerComponent ( 'ReactNativeCodeReuse' , ( ) => ReactNativeCodeReuse ) ;
5
+ AppRegistry . registerComponent ( 'ReactNativeCodeReuse' , ( ) => App ) ;
You can’t perform that action at this time.
0 commit comments