arshigtx / react-native-custom-switch Goto Github PK
View Code? Open in Web Editor NEWA fully customizable switch component for react native.
License: MIT License
A fully customizable switch component for react native.
License: MIT License
When i install "react-native-custom-switch" on my android device showing error like this,
2 | import { View, StyleSheet, Text, TouchableWithoutFeedback, Animated, LayoutAnimation, Platform, UIManager } from 'react-native';
3 |
4 | import hexToRgb from './hexToRgb';
| ^
6 | if (Platform.OS === 'android') {
7 | if (UIManager.setLayoutAnimationEnabledExperimental) {
at ModuleResolver.resolveDependency (/home/nachu/Desktop/todo_app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:137:15)
at DependencyGraph.resolveDependency (/home/nachu/Desktop/todo_app/node_modules/metro/src/node-haste/DependencyGraph.js:260:43)
and i rebuilded my app and cleared cache with npm start --reset-cache command, still showing this error
package-version = "^1.0.7"
const [switch, setSwitch] = useState(false)
useEffect(() => {
...
getValueFromServer()
...
setSwitch(true)
}, [])
return (
<CustomSwitch
startOnLeft={switch}
/>
)
I changed switch to true when I got a true from getValueFromServer(), but CustomSwitch doesn't start on right side.
Should I have to use constant to startOnLeft?
package is crashing because of wrong import
there is:
import hexToRgb from './hexToRgb';
instead of
import hexToRgb from './utils';
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.