
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
react-client-only
Advanced tools
This package provides a utility component and a React hook for only rendering React components in the browser, but not during server-side rendering.
This is useful for static-side generation when trying to avoid rehydration issues, e.g. for components dependent on the current user.
Inspired & based on the examples in this blog post.
import React from "react";
import { ClientOnly, useClientOnly } from "react-client-only";
const component = () => (
<div>
<p>This will render during SSR and on the client.</p>
<ClientOnly>
<p>This will render on the client only.</p>
</ClientOnly>
</div>
);
// or
const component2 = () => {
const isOnClient = useClientOnly();
if (!isOnClient) {
return null;
}
return <p>This will render on the client only.</p>;
};
# If you're using yarn
yarn add react-client-only
# If you're npm
npm install react-client-only
FAQs
Helpers to only render React components in a browser (not SSR)
We found that react-client-only 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.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.