Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CountDownText can't use in RN0.39.2 #5

Open
superZchen0701 opened this issue Jan 5, 2017 · 3 comments
Open

CountDownText can't use in RN0.39.2 #5

superZchen0701 opened this issue Jan 5, 2017 · 3 comments

Comments

@superZchen0701
Copy link

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 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?

@America-first-melon
Copy link

+1

@rohit-ravikoti
Copy link

Just made #8 to fix this issue.

@usejony
Copy link

usejony commented Mar 4, 2017

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants