腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
TypeError
:
firebase
react
中
的
currentUser
为
空
、
、
、
、
我发现我
的
问题已经回答了不同
的
问题,但这些问题没有帮助。 我使用自定义上下文调用
firebase
.auth().onAuthStateChanged()并设置
currentUser
。import
React
, { useState, useEffect } from "
react
"; export const AuthContext =
React<
浏览 6
提问于2020-09-21
得票数 0
3
回答
防火墙身份验证:如何解决“
TypeError
:无法读取
空
”错误
的
属性“getIdToken”
、
、
我刚开始实施auth,对于如何解决我正在处理
的
问题有些困惑。
TypeError
: Cannot read property 'getIdToken' of nullimport
React
from '
react
'
浏览 4
提问于2020-10-02
得票数 1
回答已采纳
1
回答
为什么
Firebase
用户在刷新时不再进行身份验证?
、
、
、
、
一个非常简单
的
应用程序。在/路径上,我希望在登录时呈现Home,如果没有登录,则呈现Introduction。登录页面是可行
的
,如果I console.log(
firebase
.auth().
currentUser
),它会显示所有数据,并在/上正确地呈现Home。因此,在仍然处于/路径时,会发生一些奇怪
的
事情;当我刷新页面时,我们不再登录,而是呈现Introduction。import
React
, { Component } from '
浏览 0
提问于2018-01-30
得票数 1
回答已采纳
2
回答
"
TypeError
:_this2.setState不是函数“
React
Native
由于某种原因,我收到错误消息"
TypeError
:_this2.setState不是一个函数“import
React
, {useEffect, Component} from '
react
'; import
firebase
from '@
react
-native-
firebase<
浏览 55
提问于2020-05-05
得票数 0
回答已采纳
1
回答
有条件地
为
react
导航v5
中
的
身份验证流选择屏幕而不是更新
、
、
我正在尝试使用
react
导航v5
为
react
原生应用程序创建身份验证流。即使我确定
firebase
.auth().
currentUser
!= null在我登录时计算
为
真,在我注销时计算
为
假,页面不会自动切换到"Closet“页面,就像这里说
的
:https://reactnavigation.org/docs/auth-flow/#how-it-will-work我确信我
的
登
浏览 9
提问于2020-07-24
得票数 0
1
回答
react
js应用程序
中
的
firebase
没有在状态上设置对象
、
、
、
我正在开发一个简单
的
react
应用程序,使用
firebase
作为身份验证工具。这是我
的
app.js constructor() { super();app.jsx
中
的
<h1>{this.state.
currentUser
.email}</h1>,控制台将在延迟5或6秒后记录状态,而该日志包含
浏览 1
提问于2020-08-08
得票数 0
1
回答
_
firebase
2.default.database.ref不是一个函数
、
、
我是新
的
反应本地人和做一个项目,以下一些在线教程。在给定
的
步骤
中
,我创建了一个
Firebase
数据库(还添加了一些虚拟数据并设置了一个标准规则)。在我
的
中
,为了在用户从
Firebase
进行身份验证后获取数据,我执行以下操作:export const loadInitialContacts= () => const {
cur
浏览 0
提问于2018-06-14
得票数 3
1
回答
使用数据初始化<StreamApp>
我正在使用原生代码
的
react
native。使用‘
react
-native-native feed’库,我正在尝试让Stream feed在我
的
应用程序上启动并运行。我已经使用api密钥、应用程序Id和应用程序密钥设置了我
的
流帐户。使用
firebase
函数,我在创建帐户时
为
用户创建令牌服务器端,然后将其保存到数据库。我希望得到一个没有错误
的
空
feed,但是我得到了来自Stream
的
“数据未定义”错误。 为了开始使用
浏览 2
提问于2019-07-17
得票数 1
1
回答
当使用arrayUnion向firestore
中
的
arrayField添加元素时,我得到
TypeError
default.collection不是一个函数
、
、
我正在使用ReactJs和
firebase
制作一个应用程序。在updatePlayers
中
,我严格按照
firebase
文档将元素添加到数组
中
。在firestore
中
,我有一个名为footballgames
的
集合,其中包含一个名为C3j5hXxNFKMBUM7YxaNX
的
游戏文档。它包含一个数组字段,其中包含一个玩家数组,每当调用该函数时,我都想将"John“添加到该数组
中
。然而,我一直收到错误:_
firebase
_
f
浏览 6
提问于2020-06-04
得票数 0
回答已采纳
1
回答
为什么我
的
Firebase
数据库
的
某些属性没有定义?
、
、
TypeError
:无法读取未定义
的
属性(读取“攻击”) 以下是我
的
组
浏览 5
提问于2022-12-04
得票数 0
回答已采纳
1
回答
React
原生文本this.setState
、
我刚接触
React
Native,当我使用this.setState()更改值时,我无法让我
的
变量进行更新。单击按钮时,我将调用此函数: const updateName = () => { alert(e) this.setState({ userFullName:
firebase
.aut
浏览 12
提问于2020-08-28
得票数 0
1
回答
如何使用带有jest和
react
- test -library
的
authcontext测试受保护
的
路由
、
、
、
、
我有一个带有受保护路由组件
的
react
应用程序: import
React
from '
react
';import
firebase
from '../
firebase
'; const Auth
浏览 17
提问于2021-04-21
得票数 0
1
回答
GoogleAuthProvider不是构造函数
、
、
、
我仍然在学习,我一直在学习有关reactjs
的
firebase
教程。现在,我开始研究本教程没有涉及
的
功能(匿名登录和链接到google),我认为我没有正确地理解如何使用
firebase
的
linkWithPopup。我得到了
firebase
__WEBPACK_IMPORTED_MODULE_1_.default.auth.GoogleAuthProvider :当我尝试使用
TypeError
时,它不是构造函数。: process.env.
REACT
_AP
浏览 1
提问于2021-06-03
得票数 0
回答已采纳
1
回答
Firebase
-未定义电子邮件
、
我正在尝试构建一个允许用户更改密码
的
函数。问题是,当我获得当前用户
的
数据时,它会显示电子邮件
为
空
。reauthenticate = (currentPassword) => { varcred =
fireba
浏览 3
提问于2022-07-20
得票数 0
回答已采纳
1
回答
在
React
Native
中
更改
Firebase
数据库
的
特定个别值
的
最佳方式是什么?
、
、
、
我在注册用户时使用
的
逻辑是将他们
的
详细信息添加到数据库
中
的
路径以及
Firebase
身份验证
中
。从理论上讲,这些值将更容易操作。我
的
目标是创建一个Formik表单,它将接受已登录用户
的
用户名
的
现有值,在文本输入
中
显示该值供用户更改,然后更新
Firebase
数据库
中
的
值。有人能帮上忙吗?().
currentUser
.uid; const us
浏览 11
提问于2020-04-22
得票数 0
1
回答
试图从API
中
列出用户偏好,获取"
TypeError
: null“不是一个对象(计算'
firebase
.auth().
currentUser
.uid')
、
、
我正在创建一个应用程序(ReveNative),它连接到API并允许用户将从API接收到
的
对象添加到它
的
偏好
中
。我遵循了这个,但我收到了黄色警告:“可能未处理
的
诺言Rejsction (id:0):
TypeError
: null不是一个对象(计算'
firebase
.auth().
currentUser
.uid')数据正在添加到数据库
中
,但在我
的
应用程序
中
没有列出(显示)。'native-
浏览 2
提问于2019-06-01
得票数 0
回答已采纳
2
回答
未处理
的
拒绝(
TypeError
):无法读取未定义
的
属性“_internalPath”
、
、
我一直在尝试让火力基地和
react
一起工作,并得到了这个错误import
firebase
from() const myAuthLevel = (
firebase
.auth().
currentUser
!await (await db.collection('users').doc(
firebase
.a
浏览 0
提问于2021-04-05
得票数 3
2
回答
退出时无法读取null
的
属性'uid‘
、
每次我从我
的
应用程序
中
退出时,我都会constructor( private firestore: AngularFirestore, private auth: AuthService, )
firebase
.auth().onAuthStateChanged(user => { this.
currentUser
= <e
浏览 0
提问于2019-11-19
得票数 0
回答已采纳
2
回答
我不能用火药库进入私人路线
我正在创建一个专用路由,仅在防火墙侦听器验证用户是否登录时才可访问,但我无法以我所做
的
方式访问此路由。const PrivateRoute = ({ component: Component, ...rest }) => {
firebase
.auth
浏览 2
提问于2020-05-13
得票数 0
回答已采纳
1
回答
Vue
Firebase
:
currentUser
为
空
、
、
我是Vue和
Firebase
的
新人。我使用
Firebase
查询根据当前用户电子邮件从
Firebase
数据库检索一些数据。这是工作 source:
firebase
.database().ref('service').orderByChild('userEmail').equalTo('shakil@gmail.com')所以在本例
中
,我使用
firebase
.auth().
currentUser
.
浏览 0
提问于2018-05-23
得票数 0
点击加载更多
相关
资讯
在Java中判断String类型为空和null的方法
Django2中DateTime字段查询时QuerySet为空的解决方案
扩大攻击层面:React Native Android应用程序
这里有25个React Native免费教程,请您查收
2020 年你应该知道的 React 库
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
智聆口语评测
活动推荐
运营活动
广告
关闭
领券