react-native-animations icon indicating copy to clipboard operation
react-native-animations copied to clipboard

I keep getting this error 'Attempted to assign readonly property'

Open Zedonboy opened this issue 7 years ago • 0 comments

I followed the example apps in this repo, but i get this error. Can you Yelp me out please

import { StyleSheet, Text, AppRegistry, ImageBackground, Image, Animated, Easing, View } from 'react-native';
//import { Overlay} from "@shoutem/ui";
import { Item, Form, Input, Button, Icon} from 'native-base';
import style from './styles.js';
export default class App extends React.Component {

  constructor () {
    super();
      this.blur = new Animated.Value(0),
      this.slide = new Animated.Value(-100)
  }

  // React Lifecycle method, start an Animation
  componentDidMount () {
    Animated.sequence([
      Animated.timing(this.blur, {
        toValue: 2,
        duration: 1500
      }),
      Animated.timing(this.slide, {
        toValue: 0,
        easing: Easing.in(Easing.ease),
        duration: 2000
      })
    ]).start();
  }

  render() {
    //let { blur, slide } = this.state;
    return (
      <Animated.View>
      <ImageBackground blurRadius={this.blur} source={require('./src/img/bad.jpg')} style={style.backGroundImage}>
        <Image source={require('./src/img/Cubix.png')}/>
        <Animated.View style={{transform :[{translateY : this.slide}]}}>

        <Item style={style.input} rounded>
          <Icon style={{ color: 'white' }} active name='person'/>
          <Input style={{ color: 'white' }} placeholderTextColor="white" placeholder='Email' />
        </Item>

        <Item style={style.input} rounded>
          <Icon style={{ color: 'white' }} active name='lock' />
          <Input style={{ color: 'white' }} secureTextEntry={true} placeholderTextColor="white" placeholder='Password' />
        </Item>

        <Button block>
          <Text style={{color :'white'}}>Next</Text>
        </Button>      
          </Animated.View>
      </ImageBackground>
      </Animated.View>
    );
  }
}
AppRegistry.registerComponent('AwesomeProject', () => App);```

Zedonboy avatar Jan 06 '18 23:01 Zedonboy