Skip to content

Commit

Permalink
fixes #119
Browse files Browse the repository at this point in the history
  • Loading branch information
gre committed Jul 6, 2017
1 parent 0cd9c9f commit f70b7b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/gl-react-expo/src/GLViewNative.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ export default class GLViewNative extends Component {

render() {
const { style, onContextCreate, children, ...rest } = this.props;
if (__DEV__) {
if ("width" in rest || "height" in rest) {
console.warn(
"gl-react-expo <Surface>: no such width/height prop. instead you must use the style prop like for a <View>."
);
}
}
return (
<View
{...rest}
Expand Down
7 changes: 7 additions & 0 deletions packages/gl-react-native/src/GLViewNative.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ export default class GLViewNative extends Component {

render() {
const { style, onContextCreate, children, ...rest } = this.props;
if (__DEV__) {
if ("width" in rest || "height" in rest) {
console.warn(
"gl-react-native <Surface>: no such width/height prop. instead you must use the style prop like for a <View>."
);
}
}
return (
<View
{...rest}
Expand Down

0 comments on commit f70b7b6

Please sign in to comment.