
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.
react-native-inherit
Advanced tools
Adds style inheritance to React Native.
Allows you to style text components in groups as you would in regular CSS by applying styles to a higher up component.
Example use cases:
<Text> components by wrapping your whole app in <StyleProvider><Card> component all text should be gray, you can set the color of the card component to gray and it will cascade to only the <Text> components inside the <Card> componentnpm i react-native-inherit
The main thing to note is you need to use the exported <Text> component from react-native-inherit instead of the one exported from react-native (the api is exactly the same). This allows us to pull inherited styles from higher up context.
Then to have styles cascade down, use either the <StyleProvider> component, or our re-exported React Native components such as View or TouchableOpacity that contain a special styleProvider prop.
import { Text, StyleProvider, View } from 'react-native-inhert';
// note that Text and View are imported from react-native-inherit
export default function App() {
return (
<View>
<StyleProvider style={{ color: 'green', fontWeight: 'bold' }}>
<View styleProvider={{ color: 'red', fontSize: 32 }}>
<Text>Some Red Text</Text>
<Text style={{ color: 'blue' }}>Some Blue Text</Text>
</View>
<Text>Some green text</Text>
</StyleProvider>
</View>
);
}
This produces the following:

Both the <StyleProvider> component and the re-exported React Native components with the styleProvider prop simply wrap a context that accepts the following styles:
export type InheritableTextStyles = Pick<
TextStyle,
| 'color'
| 'fontSize'
| 'fontFamily'
| 'fontWeight'
| 'fontVariant'
| 'fontStyle'
| 'lineHeight'
| 'letterSpacing'
| 'textAlign'
| 'textTransform'
>;
Inheritable styles are influenced from the DOM https://web.dev/learn/css/inheritance/#which-properties-are-inheritable
Then in our <Text> component we merge all (including nested) provided styles and forward them onto the base React Native <Text> component.
FAQs
Adds inheritable text styles to React Native
The npm package react-native-inherit receives a total of 5 weekly downloads. As such, react-native-inherit popularity was classified as not popular.
We found that react-native-inherit 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
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.