Fix live tweets loading issue
@@ -35,8 +35,7 @@ class LiveTweets extends Widget {
width: this.props.glContainer.width,
height: this.props.glContainer.height,
publishedMsg: '',
- countData: 0,
- storageArray: []
+ countData: 0
};
this.providerConfig = {
@@ -75,14 +74,16 @@ class LiveTweets extends Widget {
}
getPublishedMsgsOutput() {
+ let storageArray = [];
this.state.tweetData.map((t) => {
this.publishMsg();
- this.state.storageArray.push(t);
-
+ storageArray.push(t);
}
)
- return this.state.storageArray.reverse().map((t) => {
- return <Tweet id={t[1]} options={{height: "10%", width: '100%', cards: 'hidden'}}/>
+ return storageArray.reverse().map((t) => {
+ return (
+ <Tweet id={t[1]} options={{height: "10%", width: '100%', cards: 'hidden'}}/>
+ )
}
)
}
