
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.
[![npm package][npm-img]][npm-url] [![Downloads][downloads-img]][downloads-url] [![Issues][issues-img]][issues-url]

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
npm install next-ray
yarn add next-ray
Add your project dir path as LOCAL_PATH to your .env

This package provides a ray function that behaves like the node-ray ray function with as much next.js context as possible.
From anywhere in your project you can use the ray export to send logs to your Ray app.
import ray from 'next-ray';
ray('hello world');
When working in a client react context this package provides some more advanced options.
useRay — a hook that sends the value of a variable to your Ray app when it mutates.
'use client';
import { useRay } from 'next-ray/client';
export default function MyComponent() {
const [count, setCount] = useState(0);
useRay(count);
return (
<button onClick={() => setCount(count + 1)}>
Increment ({count})
</button>
);
}
```s
`Ray` — a component that can be wrapped around any part of your app to send it's HTML to your Ray app.
```tsx
'use client';
import { Ray } from 'next-ray/client';
export default function MyComponent({ count, increment }) {
return (
<Ray dependencies={[count]}>
<button onClick={increment} className="bg-purple-500 rounded-full text-white/80">
Increment ({count})
</button>
</Ray>
);
}
useRayWithElement — a hook version of the Ray component.
'use client';
import { useRayWithElement } from 'next-ray/client';
import { forwardRef } from 'react';
export default function MyComponent({ count, increment }) {
const ref = useRayWithElement(null, [count]);
return (
<button ref={ref} onClick={increment} className="bg-purple-500 rounded-full text-white/80">
Increment ({count})
</button>
);
}
const MyForwardRefComponent = forwardRef(function MyComponent({ count, increment }, ref) {
useRayWithElement(ref, [count]);
return (
<button ref={ref} onClick={increment} className="bg-purple-500 rounded-full text-white/80">
Increment ({count})
</button>
);
});
To install dependencies:
bun install
To build:
bun build ./src/* --outdir ./dist --sourcemap=external --external '*'
FAQs
[![npm package][npm-img]][npm-url] [![Downloads][downloads-img]][downloads-url] [![Issues][issues-img]][issues-url]
We found that next-ray 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
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.