
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@react-native-assets/navigation
Advanced tools
React Native implementation of the universal navigation component. It also works on web when used with react-native-web.
npm i @react-native-assets/navigation
Peer dependencies:
{
"react": ">=16.13.1",
"react-native": ">=0.63.2"
}
For web usage, ensure react-native resolves to react-native-web in your bundler (this package exposes a browser build and can work with common setups).
Navigation is often modeled after browser history, but React components should depend only on the props they receive. This component provides a simple, declarative way to navigate between screens by switching named children, on native and web.
import React from 'react'
import { View, Text, Button } from 'react-native'
import Navigation, { Slide, asSlide } from '@react-native-assets/navigation'
const Page2 = asSlide(View, '2')
export default function App() {
const [active, setActive] = React.useState('0')
return (
<View>
<View style={{ flexDirection: 'row', justifyContent: 'space-around' }}>
{['0', '1', '2'].map(i => (
<Button key={i} title={`Navigate to ${i}`} onPress={() => setActive(i)} />
))}
</View>
<Navigation active={active} duration={500}>
<Slide name="0" Component={View} style={{ backgroundColor: 'tomato' }}>
<Text>This is page 0</Text>
</Slide>
<Slide name="1" Component={View} style={{ backgroundColor: 'royalblue' }}>
<Text>This is page 1</Text>
</Slide>
<Page2 name="2" style={{ backgroundColor: 'seagreen' }}>
<Text>This is page 2 using the asSlide HOC</Text>
</Page2>
</Navigation>
</View>
)
}
Navigation props:
active: string – name of the active slide to displayduration?: number – transition duration in ms (default: 500)children – only children with a name prop are considered slidesHelpers:
Slide – wrapper to add a name prop to any componentasSlide(Component, defaultName) – HOC version of SlideWhen your children components do not declare a name prop, use Slide or asSlide to satisfy typing while keeping the same runtime behavior.
browser entry and can be used with react-native-web.react-native imports to react-native-web when targeting the web.name prop.active does not match any child, the first child is displayed and a warning is logged.FAQs
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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.