
Security News
Open VSX Begins Implementing Pre-Publish Security Checks After Repeated Supply Chain Incidents
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.
@tableflip/react-native-navbar
Advanced tools
A stupidly simple "stateless", route based, navigation bar component built on top of React Native's Navigator, for use with Redux.
npm install @tableflip/react-native-navbar
import React, { Component } from 'react'
import { connect } from 'react-redux'
import NavBar from '@tableflip/react-native-navbar'
import { Home, Post } from './scenes'
const Routes = {
'/': Home,
'/post/:id': Post
}
class App extends Component {
static defaultProps = { url: '/' }
render () {
return <NavBar routes={Routes} url={this.props.url} />
}
}
export default connect(({ url }) => ({ url }))(App)
params propLeftButton, Title and RightButton components in a static property called navBarCurrently route URLs only support params defined as :paramName within a URL. Wildcards are currently not supported. When navigating to a URL, the params are extracted and passed to the scene in a params prop.
For example a route like /post/:id would result in an object like { id: 'some id' } being passed to your scene in a params prop.
These params are also passed to any navBar components (see below).
static navBar = { LeftButton, Title, RightButton }Your scenes define what components should appear in the navigation bar when they are shown. All three properties are optional.
Your navBar components are passed any URL params in props.
Note: be careful when wrapping your component in a container, it can hide the navBar property from the NavBar component.
routesAn object describing the routes available to the NavBar. Keys should be URLs and values should be React Components.
urlThe URL that should currently be displayed. This can be a string, but will more commonly be an object, e.g.
// Slide in from the right
{ url: '/post/123', from: 'right' }
// Slide in from the left (looks like we're navigating "backwards")
{ url: '/', from: 'left' }
showBarDisplay a Navigator.NavigationBar at the top of the screen. This is true by default but can be disabled if your scenes need to take up the whole screen.
style, barStyle, sceneStyleStyles passed to the container, bar and scene respectively.
sceneConfigLeft and sceneConfigRightConfiguration for scene transitions. Defaults to Navigator.SceneConfigs.HorizontalSwipeJumpFromLeft and Navigator.SceneConfigs.HorizontalSwipeJumpFromRight. Scene configuration options.
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
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.