Skip to content

Instantly share code, notes, and snippets.

@adamterlson
Created June 8, 2016 20:04
Show Gist options
  • Save adamterlson/04a8fe8fcd2d7fb0a09d252ed76c33bc to your computer and use it in GitHub Desktop.
Save adamterlson/04a8fe8fcd2d7fb0a09d252ed76c33bc to your computer and use it in GitHub Desktop.

Revisions

  1. adamterlson created this gist Jun 8, 2016.
    17 changes: 17 additions & 0 deletions app.jsx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    class MyChildComponent extends Component {
    render() {
    return (
    <View style={[{ height: 100 }, this.props.style]}>
    The height of this container will be **50**
    </View>
    );
    }
    }

    class MyParentComponent extends Component {
    render() {
    return (
    <MyChildComponent style={{ height: 50 }} />
    );
    }
    }