
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
react-navigation-mobx-helpers
Advanced tools
React-Navigation bindings for MobX
npm install react-navigation-mobx-helpers --save
import React from 'react';
import { Provider, inject, observer } from 'mobx-react';
import { StackNavigator } from 'react-navigation';
import NavigationStore from 'react-navigation-mobx-helpers';
const RootNavigator = StackNavigator(RouteConfigs);
const rootNavigation = new NavigationStore();
class Root extends React.Component {
render() {
return (
<Provider rootNavigation={rootNavigation}>
<App />
</Provider>
);
}
}
@inject('rootNavigation')
@observer
class App extends React.Component {
render() {
const { rootNavigation } = this.props;
return <RootNavigator ref={rootNavigation.createRef} />;
}
}
Action | Parameter | Description |
---|---|---|
createRef | ref: React.Component | Save an instance of navigation to store |
dispatch | action: NavigationAction | Send an action to router |
getParam | paramName: string, fallback?: NavigationParams | Get a specific param with fallback |
setParams | newParams: NavigationParams | Make changes to route's params |
navigate | { routeName: string, params?: NavigationParams, action?: NavigationAction, key?: string } OR routeName: string, params?: NavigationParams, action?: NavigationAction | Go to another screen, figures out the action it needs to take to do it |
push | routeName: string, params?: NavigationParams, action?: NavigationAction | Navigate forward to new route in stack |
replace | routeName: string, params?: NavigationParams, action?: NavigationAction | Replace the current route with a new one |
goBack | routeKey?: string | null | Close active screen and move back in the stack |
pop | n?: number, params?: { immediate?: boolean } | Go back in the stack |
popToTop | params?: { immediate?: boolean } | Go to the top of the stack |
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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.