
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-rnx
Advanced tools
BerthX libs
Useful library package containing:
yarn add react-native-rnx
Also checkout the peerDependencies in package.json, it was tested only with these deps
// App.tsx
import {
Router,
initLocalization,
useLocalization,
createStateProvider,
} from 'react-native-rnx';
import en from '@localizations/en.json';
initLocalization({en});
import Routes from '@models/Routes';
import Home from '@screens/Home';
import Settings from '@screens/Settings';
import Feed from '@screens/Feed';
import NotificationsSettings from '@screens/NotificationsSettings';
interface GlobalState {
username: string;
}
const App = () => {
const {localize} = useLocalization();
const [StateProvider] = useState(
createStateProvider<GlobalState>({}, state => state, [
'username', // If specied here, data will be persisted in local storage
]),
);
return (
<StateProvider.Element>
<Router
tabs={{
[Routes.Tab1]: {
initial: Routes.Home,
title: localize('tabs.1'),
iconName: 'clock',
screens: [
{component: Home, name: Routes.Home},
],
},
[Routes.Tab2]: {
initial: Routes.Explore,
title: localize('tabs.2'),
iconName: 'graduation-cap',
screens: [
{component: Feed, name: Routes.Feed},
],
},
[Routes.Tab3]: {
initial: Routes.Settings,
title: localize('tabs.3'),
iconName: 'user',
screens: [
{component: Settings, name: Routes.Settings},
{component: NotificationsSettings, name: Routes.NotificationsSettings},
],
},
}}
/>
</StateProvider.Element>
);
};
export default App;
How to use navigation hook
import {useNavigation} from '@react-navigation/native';
import Routes from '@models/Routes';
const Component = () => {
const {navigate, goBack} = useNavigation();
const notif = {data: 1};
const navigateToNotifSettingsScreen = () => {
navigate(Routes.NotificationsSettings, {notif});
}
const goBackInStack = () => {
goBack();
}
}
export default Component;
How to use store hook
import GlobalState from '@models/GlobalState';
import {useGlobalState} from 'react-native-rnx';
const Component = () => {
const {globalState, setGlobalState} = useGlobalState<GlobalState>();
const username = globalState.username;
const updateUsername = (newVal: string) => {
setGlobalState({username: newVal}); // This will be persist in localStorage because it was specifed in App.js
}
}
export default Component;
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
BerthX libs
The npm package react-native-rnx receives a total of 19 weekly downloads. As such, react-native-rnx popularity was classified as not popular.
We found that react-native-rnx demonstrated a healthy version release cadence and project activity because the last version was released less than 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.