Added support for styles to be updated dynamically

This commit is contained in:
Nick
2017-10-23 16:41:51 -07:00
parent 9bf099ffd0
commit 5a94ab2ea6
15 changed files with 139 additions and 12 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { NativeModules, requireNativeComponent } from 'react-native';
import { cloneReactChildrenWithProps } from '../utils';
const MapboxGL = NativeModules.MGLModule;
@@ -36,7 +37,7 @@ class VectorSource extends React.Component {
};
return (
<RCTMGLVectorSource {...props}>
{this.props.children}
{cloneReactChildrenWithProps(this.props.children, { sourceID: this.props.id })}
</RCTMGLVectorSource>
);
}