react-native-sk-countdown icon indicating copy to clipboard operation
react-native-sk-countdown copied to clipboard

CountDownText can't use in RN0.39.2

Open superZchen0701 opened this issue 8 years ago • 3 comments

I have install npm install react-native-sk-countdown@lastest --save and import by var {CountDownText} = require('react-native-sk-countdown'); but when I use <CountDownText /> follow the example behind this: <CountDownText style={styles.countBtn} countType='seconds' // 计时类型:seconds / date auto={true} // 自动开始 afterEnd={this._countingDone} // 结束回调 timeLeft={60} // 正向计时 时间起点为0秒 step={-1} // 计时步长,以秒为单位,正数则为正计时,负数为倒计时 startText='获取验证码' // 开始的文本 endText='获取验证码' // 结束的文本 intervalText={(sec) => '剩余秒数:'+sec} // 定时的文本回调 />

but there is something wrong tips: Seems you're trying to access 'ReactNative.createClass' from the 'react-native' package. Perhaps you meant to access 'React.createClass' from the 'react' package instead? For example, instead of: import React, { Component, View } from 'react-native'; You should now do: import React, { Component } from 'react'; import { View } from 'react-native'; Check the release notes on how to upgrade your code - https://github.com/facebook/react-native/releases/tag/v0.25.1

However I have used: var ReactNative=require('react-native'); var React=require('react'); var StyleSheet=ReactNative.StyleSheet; var Text=ReactNative.Text; var View=ReactNative.View; var AlertIOS=ReactNative.AlertIOS; var TextInput=ReactNative.TextInput; var AsyncStorage=ReactNative.AsyncStorage; var TouchableOpacity=ReactNative.TouchableOpacity;

var Login=React.createClass({ ...})

Anyone could help with this problem?

superZchen0701 avatar Jan 05 '17 12:01 superZchen0701

+1

America-first-melon avatar Feb 15 '17 09:02 America-first-melon

Just made #8 to fix this issue.

rohit-ravikoti avatar Feb 18 '17 16:02 rohit-ravikoti

+1

usejony avatar Mar 04 '17 09:03 usejony