react-native-material-dropdown
react-native-material-dropdown copied to clipboard
Not Working with RN0.64
ERROR TypeError: undefined is not an object (evaluating '_reactNative.Animated.Text.propTypes.style')
Dropdown@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.app&modulesOnly=false&runModule=true:106593:36
RCTView
View
App
RCTView
View
RCTView
View
AppContainer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.app&modulesOnly=false&runModule=true:74649:36
ERROR Error: Requiring module "node_modules/react-native-material-textfield/index.js", which threw an exception: TypeError: undefined is not an object (evaluating '_reactNative.Animated.Text.propTypes.style')
Dropdown@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.app&modulesOnly=false&runModule=true:106593:36
RCTView
View
App
RCTView
View
RCTView
View
AppContainer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.app&modulesOnly=false&runModule=true:74649:36
WARN Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: %s Dropdown
import React from 'react';
import {Text, View, StyleSheet} from 'react-native';
import {Dropdown} from 'react-native-material-dropdown';
const App = () => {
const data = [
{
value: 'Banana',
},
{
value: 'Mango',
},
{
value: 'Pear',
},
];
return (
<View style={styles.container}>
<Text>Home Page</Text>
<Dropdown label="Favorite Fruit" data={data} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
toast: {
backgroundColor: 'red',
},
text: {
color: 'white',
fontSize: 30,
},
});
export default App;
Dependencies
"dependencies": {
"react": "17.0.1",
"react-native": "0.64.0",
"react-native-material-dropdown": "^0.11.1"
},
@learncodingforweb, did you ever find a work-around for this?
I am still facing this issue in
- react-native: 0.68.0
- react: 17.0.2
- react-native-material-dropdown: 0.11.1
+1