![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
react-waypoint-jk
Advanced tools
A React component to execute a function whenever you scroll to an element.
A React component to execute a function whenever you scroll to an element. Works in all containers that can scroll, including the window.
React Waypoint can be used to build features like lazy loading content, infinite scroll, or docking elements to the viewport on scroll.
Inspired by Waypoints, except this little library grooves the React way.
npm install react-waypoint --save
var Waypoint = require('react-waypoint');
<Waypoint
onEnter={this._handleWaypointEnter}
onLeave={this._handleWaypointLeave}
/>
A waypoint normally fires onEnter
and onLeave
as you are scrolling, but it
can fire because of other events too:
onEnter
if it's visible on the page)Callbacks will only fire if the new position changed from the last known
position. Sometimes it's useful to have a waypoint that fires onEnter
every
time it is updated as long as it stays visible (e.g. for infinite scroll). You
can then use a key
prop to control when a waypoint is reused vs. re-created.
<Waypoint
key={cursor}
onEnter={this._loadMoreContent}
/>
propTypes: {
/**
* Function called when waypoint enters viewport
* Both parameters will be null if the waypoint is in the
* viewport on initial mount.
*
* @param {Event|null} event
* @param {Waypoint.above|Waypoint.below|null} from
*/
onEnter: PropTypes.func,
/**
* Function called when waypoint leaves viewport
*
* @param {Event|null} event
* @param {Waypoint.above|Waypoint.below} to
*/
onLeave: PropTypes.func,
/**
* Threshold - a percentage of the height of the visible
* part of the scrollable parent (e.g. 0.1)
*/
threshold: PropTypes.number,
/**
* Scrollable Parent - A custom parent to determine if the
* target is visible in it. This is useful in cases where
* you do not want the immediate scrollable ancestor to be
* the container. For example, when your target is in a div
* that has overflow auto but you are detecting onEnter based
* on the window.
*/
scrollableParent: PropTypes.any,
/**
* FireOnRapidScroll - if the onEnter/onLeave events are to be fired
* on rapid scrolling
*/
fireOnRapidScroll: PropTypes.bool,
},
In this component we make a few assumptions that we believe are generally safe, but in some situations might present limitations.
window
if no scrollable container is found). This
means that if your scrollable container has a height that is greater than the
window, it might trigger onEnter
unexpectedly.Credit to trotzig and lencioni for writing this component, and the Brigade team for open sourcing it.
Thanks to the creator of the original Waypoints library, imakewebthings.
FAQs
A React component to execute a function whenever you scroll to an element.
The npm package react-waypoint-jk receives a total of 1 weekly downloads. As such, react-waypoint-jk popularity was classified as not popular.
We found that react-waypoint-jk 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.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.