
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
react-native-city-select
Advanced tools
[](https://github.com/ryanyu104/react-native-city-select/blob/master/LICENSE.md) [](https://www.npmjs.com/package/react-native-city-
npm install react-native-city-select@latest --save
import React, { Component } from 'react';
import { StyleSheet, Text, View,TouchableOpacity } from 'react-native';
import CitySelect from 'react-native-city-select'
import CITY from './cityData.js'
export default class App extends Component {
constructor(props) {
super(props)
this.state = {
isVisable: false,
cityText: '',
cityId: '',
}
}
handleChangeCityStatus=()=>{
this.setState({
isVisable: !this.state.isVisable,
})
}
handleCitySelect=(cityObj)=> {
this.setState({
isVisable: false,
cityText: cityObj.cityName,
cityId: cityObj.cityId,
})
}
render() {
return (
<View style={styles.container}>
<TouchableOpacity
onPress={this.handleChangeCityStatus}
>
<Text>
click me!
</Text>
</TouchableOpacity>
<Text>
{this.state.cityText}{this.state.cityId}
</Text>
<CitySelect
isVisable={this.state.isVisable}
cancelCity={this.handleChangeCityStatus}
selectCity={this.handleCitySelect}
cityData={CITY}
selectedId={this.state.cityId}
cityGrid={2}
/>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex:1,
justifyContent:'center',
alignItems:'center'
},
});
Position: Put the CitySelect component at the bottom of the container, to avoid hierarchical relation problem.
City data: Get the data of Chinese cities, click here
const CITY = {
A: [
{
cityId: '279',
cityName: '阿坝',
cityNameEn: 'Aba',
},
{
cityId: '329',
cityName: '安康',
cityNameEn: 'Ankang',
},
...
],
...
}
Key | Type | Defalut |
---|---|---|
cancelCity | function | null |
cancelColor | string | '#51a8fb' |
cancelSize | number | 14 |
selectedBg | string | '#26A1FD' |
selectedId | string | '' |
selectCity | function | null |
cityData | object | null |
cancelText | string | '取消' |
titleText | string | '选择城市' |
hasHeader | boolean | true |
cityGrid | number | 1 |
key | Type |
---|---|
cityObj | Object |
FAQs
[](https://github.com/ryanyu104/react-native-city-select/blob/master/LICENSE.md) [](https://www.npmjs.com/package/react-native-city-
The npm package react-native-city-select receives a total of 11 weekly downloads. As such, react-native-city-select popularity was classified as not popular.
We found that react-native-city-select 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.