![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-anchor-link-smooth-scroll
Advanced tools
React component for anchor links using the smoothscroll polyfill.
React component for anchor links using the smoothscroll polyfill.
Install dependency: npm install react-anchor-link-smooth-scroll
Add script
import React from 'react'
import ReactDOM from 'react-dom'
import AnchorLink from 'react-anchor-link-smooth-scroll'
const SmoothScroll = () => (
<div>
<AnchorLink href='#things'>Things</AnchorLink>
<AnchorLink href='#stuff'>Stuff</AnchorLink>
<section id='things'>
<h2>Things</h2>
</section>
<section id='stuff'>
<h2>Stuff</h2>
</section>
</div>
)
ReactDOM.render(
<SmoothScroll />,
document.getElementById('content')
)
Options; offset the amount of pixels from the top, for if you have a sticky navigation.
Regular offset
<AnchorLink offset='100' href='#things'>Things</AnchorLink>
For responsive offset you can provide a function returning the needed integer to scroll from
<AnchorLink offset={() => 100} href='#things'>Things</AnchorLink>
v.1.0.12 (February 5th 2019) @vai0 Modifies how the distance from the top of the page to the anchor element is calculated.
v.1.0.11 (July 24th 2018), @ericmasiello Fixed; offset prop from being spread, to avoid remaining props spread to anchor link element.
v1.0.10 (May 30th 2018), @DanMMX Created an option to receive a function for an offset calculation.
v1.0.9 (April 24th 2018), @gazpachu Fix to have hash change in address bar.
v1.0.7 (April 10th 2018), @zauni Fixed problem with nested HTML inside the anchor.
@roborourke Fixed possibility of a custom onClick handler for secondary side effects.
Licensed under the MIT Licence.
FAQs
React component for anchor links using the smoothscroll polyfill.
We found that react-anchor-link-smooth-scroll 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.