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:
parent
2c076cdbdf
commit
cdf1b0e5d5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue