Skip to content

Commit

Permalink
Note about flex
Browse files Browse the repository at this point in the history
Summary:
Hopefully, this will save an hour of WTFs for the next reader.
Closes #14876

Differential Revision: D5385881

Pulled By: hramos

fbshipit-source-id: 56961e8a5eb3b6fae4f92c7fb9fea1e1147a3521
  • Loading branch information
petrbela authored and facebook-github-bot committed Aug 17, 2017
1 parent 2c076cd commit cdf1b0e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/NativeComponentsIOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ render() {

Make sure to use `RNTMap` here. We want to require the manager here, which will expose the view of our manager for use in Javascript.

**Note:** When rendering, don't forget to stretch the view, otherwise you'll be staring at a blank screen.

```javascript
render() {
return <MapView style={{flex: 1}} />;
}
```

This is now a fully-functioning native map view component in JavaScript, complete with pinch-zoom and other native gesture support. We can't really control it from JavaScript yet, though :(

## Properties
Expand Down

0 comments on commit cdf1b0e

Please sign in to comment.