Fixed a TypeScript Error#1687
Fixed a TypeScript Error#1687gpeal merged 1 commit intoreact-native-maps:masterfrom PaitoAnderson:patch-1
Conversation
|
Also having this issue, waiting for the merge. |
|
Hi @PaitoAnderson @gpeal , Getting this exception when I am trying to load MapView from .tsx file. Same works beautifully if I load it from Javascript(.js) file. Please help. Unhandled JS Exception: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. |
|
Have you tried: |
|
@luiseduardobrito Brilliant, it worked :) Thank you so much :) |
|
@PaitoAnderson adding support for typescript is greatly appreciated! To make it easier to use this package with typescript, would you mind adding a little example? I first struggled with the import issue, but I still cannot get my code to typecheck. e.g. I use a or more visible even: where is the definition for having a little example to start with would for sure help the typescript users. For my part I switched back to 0.16.4 since I did not find a quick solution. |
|
@marcmo Here is a quick example, looks like I forgot the |
|
super awesome @PaitoAnderson ! I bet this will help others as well. |
Fixed a TypeScript Error
* Added style prop to MapCalloutProps in Typings Fixes @marcmo issue in react-native-maps#1687 * Update index.d.ts Added style on MapView.Marker


Fix a bug I found after submitting PR #1601.
I was getting this error:
[TS] Exports and export assignments are not permitted in module augmentations.Thanks!