我正在尝试在反应原生项目中使用firebase
我在我的项目中安装了firebase:
npm install --save firebase
Run Code Online (Sandbox Code Playgroud)
我将它导入我的app.js
import firebase from 'firebase';
import React, { Component } from 'react';
import {
Platform,
Text,
View
} from 'react-native';
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<View >
<Text>Testando Firebase</Text>
</View>
);
}
}
Run Code Online (Sandbox Code Playgroud)
然后显示错误:
对象不能作为反应子项(找到:具有键{&& typeof,type,key,ref,props,_owner,_store}的对象).如果您要渲染子集合,请使用数组.
但是当我从firebase中删除导入时,该应用程序运行正常.
我正在尝试使用以下命令格式化货币
<h1>R$ {{item.valor | currency:"BRL":true:1.2 }}</h1>
Run Code Online (Sandbox Code Playgroud)
但是会显示此错误
digitsinfo.match is not a function
Run Code Online (Sandbox Code Playgroud)
如何在Ionic 3中以正确的格式获得资金?