
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@surfside/ads-react
Advanced tools
The library follows a modern, modular React architecture with two primary layers:
SurfsideProvider – Initializes the Surfside Ads SDK and manages shared global context.This separation of concerns allows for clean and extensible integration across a variety of use cases.
# Using npm
npm install @surfside/ads-react
# Using yarn
yarn add @surfside/ads-react
# Using bun
bun add @surfside/ads-react
SurfsideProvider to provide the necessary context.export default function App() {
return (
<html lang="en">
<head>
{/* Head Content */}
</head>
<body>
<SurfsideProvider
channelId='XXXXX'
accountId='XXXXX'
siteId='XXXXX'
locationId='surfside-nyc'
userId='surfside-007'
>
<div>
{/* Application Content */}
</div>
</SurfsideProvider>
</body>
</html>
);
}
useSurfsideBanner hook.const Homepage = () => {
const {
banner,
loading,
error,
analytics
} = useSurfsideBanner({
zoneId: 'XXXXX',
size: [4,1 ]
});
useEffect(() => {
analytics?.trackWin();
}, [analytics]);
if (loading) {
return <BannerSkeleton/>;
}
if (error) {
return <FallbackComponent/>;
}
return (
<div>
<h1>Welcome!</h1>
<MenuBar/>
{/* Banner Ad right below the menu bar */}
<div dangerouslySetInnerHTML={{__html: banner.adm}}></div>
{/* ... webpage content */}
</div>
);
};
Follow these guides to set up your Surfside Ads implementation
The @surfside/ads-react library is designed to be client-side only. All hooks and rendering logic must run in the browser as access to the browser API is required for bid requests to function correctly. Server-side rendering (SSR) is not supported yet, and attempting to use hooks or providers on the server will result in runtime errors.
To avoid hydration issues, always ensure components using Surfside hooks are rendered only after the client has mounted.
const IsClientOnly = ({ children }: { children: React.ReactNode }) => {
const [ready, setReady] = React.useState(false);
React.useEffect(() => setReady(true), []);
return ready ? <>{children}</> : null;
};
You can wrap Surfside components in a guard like this if needed.
Copyright © 2025 Surfside. All rights reserved.
FAQs
React components for Surfside Ads
We found that @surfside/ads-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.