
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
dev-as-speed
Advanced tools
Welcome to dev-as-speed! This package provides a versatile re-usable components which covers most of the common used components and utilities in the react-native ,There are many solutions or components for React Native applications development, offering a ThemeProvider component and a useTheme hook to manage themes.
To install the package, use:
npm install dev-as-speed
# or
yarn add dev-as-speed
import React from 'react';
import { ThemeProvider, useTheme } from 'dev-as-speed';
import { View, Text, TouchableOpacity } from 'react-native';
const App = () => {
// define your custom colors for both the theme
const customLightTheme = {
// Customized properties for light theme
primaryColor: '#FF9900',
secondaryColor: '#00FF99',
// Additional properties...
};
const customDarkTheme = {
// Customized properties for dark theme
primaryColor: '#9900FF',
secondaryColor: '#FF0099',
// Additional properties...
};
return (
<ThemeProvider customLightTheme={customLightTheme} customDarkTheme={customDarkTheme}>
<MainApp />
</ThemeProvider>
);
};
const MainApp = () => {
const { currentTheme } = useTheme();
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: currentTheme.backgroundColor }}>
<Text style={{ color: currentTheme.textColor }}>Theme Example</Text>
<TouchableOpacity onPress={toggleTheme}>
<Text>Toggle Theme</Text>
</TouchableOpacity>
</View>
);
};
export default App;
The ThemeProvider component allows you to manage themes within your React Native application. It provides flexibility by accepting custom theme properties for both light and dark themes.
useTheme hook provide the properties for the theme utilization
export const lightTheme = {
primaryColor: '#3498db',
secondaryColor: '#2ecc71',
textColor: '#333', // Common text color for light theme
backgroundColor: '#FFF', // Common background color for light theme
};
export const darkTheme = {
primaryColor: '#9b59b6',
secondaryColor: '#e74c3c',
textColor: '#DDD', // Common text color for dark theme
backgroundColor: '#111', // Common background color for dark theme
// Other dark theme properties
};
If you want to use network connectivity you need to add peer dependency :
npm install @react-native-community/netinfo
# or
yarn add @react-native-community/netinfo
NetworkProvider - App.js...
import {ThemeProvider,NetworkProvider} from 'dev-as-speed'
export default function App() {
return (
<ThemeProvider customLightTheme={customLightTheme} customDarkTheme={customDarkTheme}>
<NetworkProvider>
<MainNavigator />
</NetworkProvider>
</ThemeProvider>
);
}
import React from 'react';
import { useNetwork } from 'dev-as-speed';
import { View, Text, TouchableOpacity } from 'react-native';
const ComponentA = () => {
const {network} = useNetwork()
return (
<View>
<Text>{network}</Text>
</View>
);
};
export default Component;
FAQs
speed up your development
We found that dev-as-speed 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.