
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
use-inside
Advanced tools
[](https://www.npmjs.com/package/use-inside) [](https://bundlephobia.com/result?p=use-inside)
useInside() allows a component to be aware if its "inside" the subtree of another component and receive data from it, in the most straightforward, simple way possible.
Add it to your project:
yarn add use-inside
Use it in your React app:
// App.js
import React from 'react'
import { Inside, useInside } from 'use-inside'
function App() {
return (
<>
<h1>useInside</h1>
<Inside name="papaya" data={{backgroundColor: 'papayawhip'}}>
<Greeting />
</Inside>
</>
)
}
function Greeting() {
const [inside, data] = useInside('papaya')
return <h2 style={{...data}}>{inside && 'papaya'}</h2>
}
export default App
This is the provider component. It should be placed above any component using useInside(). Apart from children, it accepts two other props:
The name of the inside context. Required for storing the context into a map for later retrieval.
The data passed to the component using useInside(). Accepts any type.
This is the hook to be used throughout the app.
It takes a string as a single required param, and returns an array containing the following:
inside: A boolean that will be true if the component is in the subtree of the provider
Inside component.data: The data passed through the Inside component.FAQs
[](https://www.npmjs.com/package/use-inside) [](https://bundlephobia.com/result?p=use-inside)
The npm package use-inside receives a total of 99 weekly downloads. As such, use-inside popularity was classified as not popular.
We found that use-inside demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.