Note about flex

Summary:
Hopefully, this will save an hour of WTFs for the next reader.
Closes https://github.com/facebook/react-native/pull/14876

Differential Revision: D5385881

Pulled By: hramos

fbshipit-source-id: 56961e8a5eb3b6fae4f92c7fb9fea1e1147a3521
This commit is contained in:
Petr Bela 2017-08-16 23:34:23 -07:00 committed by Facebook Github Bot
parent 2c076cdbdf
commit cdf1b0e5d5
1 changed files with 8 additions and 0 deletions

View File

@ -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