我正在尝试学习react,我正在创建一个使用firebase数据库、auth和电影数据库api的web应用程序。我可以让用户点击一部电影,并将该电影添加到他们的观看列表中,“将该电影的信息发送到firebase”。现在我正在尝试检索这些信息,并且我成功了,但我的代码目前导致浏览器锁定和崩溃,并无休止地记录,我需要强制退出。我不确定我错在哪里了?当我将渲染中的代码放入构造函数或componentDidMount中时,this.props.user返回null。我很困惑:( app.js constructor passing state to watchlist component 代码如下:
使用dicussion应用程序时遇到问题。我只能在给定的time.Having中渲染标题或post,但在thread.jsx中如何渲染存在问题。此应用程序在react和firebase中。请建议我如何解决这个问题。我认为post中的map函数不是用map函数编写对象的right.how。我需要把object写成道具吗?
Thread.jsx
postEditor.jsx-----
import React, {Component} from 'react';
import './DpostEditor.css';
export default class Po
我在我的应用程序中使用web组件。在web组件中,我需要插入一个react组件。Web组件具有Shadow DOM。当我尝试使用下面的命令来呈现react组件时,我得到了错误。
comp = React.createElement(ReactElem, {
config: config,
onRender: handleRender
});
ReactDOM.render(comp , self.shadowRoot.querySelector('#app1'));
错误
target container is not a dom element
我尝试使用W
我使用flatlist在原生react中渲染我的数据,但是flatlist渲染大量数据的速度非常慢,在快速滚动之后,它会重新渲染数据。由于这一点,我的应用程序需要很长时间才能显示完整的数据。我也收到了这样的消息
VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldCompo