
Security News
Re-Enabled GitHub Actions Expose Thousands of Repositories to Mini Shai-Hulud
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.
react-infinite-feed
Advanced tools
Infinite feed with up or down scroll direction
npm install --save react-infinite-feed
This component helps to implement infinite scroll.
It takes loadOffset property and when user scrolled to that point it handles onReachOffset function,
which can be used to load additional data to the feed.
By default scroll works from the top to the bottom (like socials feeds e.g. facebook or instagram).
If you set property isScrollUp the component will scroll from the bottom to the top (like messengers e.g. telegram).
import React, { PureComponent } from 'react'
import Feed from 'react-infinite-feed'
import Loader from './Loader/Loader'
import Message from './Message/Message'
export default class Chat extends PureComponent {
state = {
shouldScrollUp: false,
shouldScrollDown: false,
}
componentDidUpdate({ chatMessages: oldChatMessages }) {
const { chatMessages } = this.props
// these steps are necessary only if your scroll direction is up
const isMessagesUpdated = (
!oldChatMessages.length
|| chatMessages.some(({ id }, index) => !oldChatMessages[index] || oldChatMessages[index].id !== id)
)
if (!oldChatMessages.length) {
this.setState({
shouldScrollDown: true,
})
}
else if (isMessagesUpdated) {
this.setState({
shouldScrollUp: true,
})
}
else {
this.setState({
shouldScrollUp: false,
shouldScrollDown: false,
})
}
}
fetchMoreMessages = () => {
// Some actions to fetch more messages to 'chatMessages' property
}
render() {
const { shouldScrollUp, shouldScrollDown } = this.state
const { chatMessages, loadOffset, isLoadedChatMessages } = this.props
return (
<Feed
isScrollUp
onReachOffset={this.fetchMoreMessages}
{...{ loadOffset, shouldScrollUp, shouldScrollDown }}
>
{
isLoadedChatMessages
? chatMessages.map(({ id, message, author }) => (
<Message key={id} {...{ id, message, author }} />
))
: <Loader />
}
</Feed>
)
}
}
FAQs
Infinite feed with up or down scroll direction
The npm package react-infinite-feed receives a total of 8 weekly downloads. As such, react-infinite-feed popularity was classified as not popular.
We found that react-infinite-feed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.

Research
/Security News
The compromise affects MemTensor's MemOS, an open source memory framework for large language models (LLMs) and AI agents. Both npm package @memtensor/memos-cloud-openclaw-plugin and the PyPI package MemoryOS are compromised. They drop cross-platform Go binaries that exfiltrate developer secrets.